中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

做網(wǎng)站所用的技術(shù)推廣普通話的宣傳語

做網(wǎng)站所用的技術(shù),推廣普通話的宣傳語,蘋果軟件做ppt模板下載網(wǎng)站,網(wǎng)站有哪些區(qū)別Alex教程每一P的教程原代碼加上我自己的理解初步理解寫的注釋,可供學(xué)習(xí)Alex教程的人參考 此代碼僅為較上一P有所改變的代碼 【Unity教程】從0編程制作類銀河惡魔城游戲_嗶哩嗶哩_bilibili IceAndFire_Controller.cs using System.Collections; using System.Coll…

Alex教程每一P的教程原代碼加上我自己的理解初步理解寫的注釋,可供學(xué)習(xí)Alex教程的人參考
此代碼僅為較上一P有所改變的代碼


【Unity教程】從0編程制作類銀河惡魔城游戲_嗶哩嗶哩_bilibili

IceAndFire_Controller.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class IceAndFire_Controller : ThurderStrike_Controller
{protected override void OnTriggerEnter2D(Collider2D collision){base.OnTriggerEnter2D(collision);}
}

ThurderStrike_Controller.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class ThurderStrike_Controller : MonoBehaviour
{protected virtual void OnTriggerEnter2D(Collider2D collision){if(collision.GetComponent<Enemy>()!= null){PlayerStats playerStats = PlayerManager.instance.player.GetComponent<PlayerStats>();EnemyStats enemyTarget = collision.GetComponent<EnemyStats>(); playerStats.DoMagicaDamage(enemyTarget);}}
}
IceAndFire_Effect.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;[CreateAssetMenu(fileName = "Ice and Fire effect", menuName = "Data/Item effect/Ice and Fire")]
public class IceAndFire_Effect : ItemEffect
{[SerializeField] private GameObject iceAndFirePrufab;[SerializeField] private float xVelocity;public override void ExecuteEffect(Transform _respawPosition){Player player = PlayerManager.instance.player;bool thirdAttack = player.GetComponent<Player>().primaryAttack.comboCounter == 2;//設(shè)置第三下平a產(chǎn)生火球if (thirdAttack)//設(shè)置第三下平a產(chǎn)生火球{GameObject newIceAndFire = Instantiate(iceAndFirePrufab, _respawPosition.position, player.transform.rotation);//使火球旋轉(zhuǎn)方向與player對齊newIceAndFire.GetComponent<Rigidbody2D>().velocity = new Vector2(xVelocity*player.facingDir,0);//獲得速度并使其朝向與player一致Destroy(newIceAndFire, 10);// 自動銷毀10秒}}
}

ThurderStrike_Effect.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;[CreateAssetMenu(fileName = "Thurder strike effect", menuName = "Data/Item effect/Thurder strike")]
public class ThurderStrike_Effect : ItemEffect
{[SerializeField] private GameObject thurderStrikePrefab;public override void ExecuteEffect(Transform _enemyPosition){GameObject newThurderStrike = Instantiate(thurderStrikePrefab,_enemyPosition.position,Quaternion.identity);Destroy(newThurderStrike, 1);}
}
PlayerPrimaryAttack.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class PlayerPrimaryAttackState : PlayerState
{//p38 2.從ground進入public int comboCounter { get; private set; }private float lastTimeAttacked;//距離上一次攻擊的時間private float comboWindow = 2;//可以間隔的時間public PlayerPrimaryAttackState(Player _player, PlayerStateMachine _stateMachine, string _animBoolName) : base(_player, _stateMachine, _animBoolName){}public override void Enter(){base.Enter();xInput = 0;//修復(fù)攻擊亂轉(zhuǎn)的問題if(comboCounter >2||Time.time>comboWindow+lastTimeAttacked)//當(dāng)計數(shù)器超過2和間隔時間大于window時,進入第一個攻擊動作{comboCounter = 0;}player.anim.SetInteger("ComboCounter", comboCounter);//設(shè)置animtor里的comboCounter#region 選擇攻擊方向float attackDir = player.facingDir;if(xInput != 0){attackDir = xInput;}#endregion//使其能改變攻擊方向player.SetVelocity(player.attackMovement[comboCounter].x * attackDir, player.attackMovement[comboCounter].y);//給角色初速度,讓角色在攻擊觸發(fā)時移動一點stateTimer = .1f;}public override void Exit(){base.Exit();player.StartCoroutine("BusyFor", .15f);comboCounter++;lastTimeAttacked = Time.time;}public override void Update(){base.Update();if(stateTimer<0){player.SetZeroVelocity();}//1.修改移動時攻擊時后可以移動的BUG//2.但給了點時間模擬慣性可以動一點if (triggerCalled){stateMachine.ChangeState(player.idleState);}}
}
PlayerAnimationTrigger.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class playerAnimationTriggers : MonoBehaviour
{private Player player => GetComponentInParent<Player>();//獲得夫組件上的實際存在的Player組件private void AnimationTrigger(){player.AnimationTrigger();}private void AttackTrigger(){Collider2D[] colliders = Physics2D.OverlapCircleAll(player.attackCheck.position, player.attackCheckRadius);//創(chuàng)建一個碰撞器組,保存所有圈所碰到的碰撞器//https://docs.unity3d.com/2022.3/Documentation/ScriptReference/Physics2D.OverlapCircleAll.htmlforeach(var hit in colliders)//https://blog.csdn.net/m0_52358030/article/details/121722077{if(hit.GetComponent<Enemy>()!=null){EnemyStats _target = hit.GetComponent<EnemyStats>();if(_target != null)//修復(fù)無敵人時觸發(fā)DoDamge出錯的bugplayer.stats.DoDamage(_target);//提供一個可以從player調(diào)用敵人受傷函數(shù)的入口,通過傳入受傷敵人的組件if(Inventory.instance.GetEquipment(EquipmentType.Weapon) != null)Inventory.instance.GetEquipment(EquipmentType.Weapon).Effect(_target.transform);// hit.GetComponent<Enemy>().DamageImpact();}}}private void ThrowSword(){SkillManager.instance.sword.CreateSword();}
}

http://www.risenshineclean.com/news/39570.html

相關(guān)文章:

  • 國內(nèi)網(wǎng)站開發(fā)短視頻精準(zhǔn)獲客系統(tǒng)
  • 品牌專業(yè)建設(shè)網(wǎng)站常見的搜索引擎
  • 在哪能學(xué)到網(wǎng)站建設(shè)專業(yè)seo推廣是做什么
  • 做植物提取物好的推廣網(wǎng)站seo自動優(yōu)化軟件下載
  • 校園網(wǎng)站規(guī)劃與建設(shè)工具大全
  • 網(wǎng)站建設(shè)app開發(fā)合同范本百度普通下載
  • 新疆建設(shè)廳官方網(wǎng)站文件鏈接推廣
  • 無錫 網(wǎng)站建設(shè)黃頁88網(wǎng)官網(wǎng)
  • 同個主體新增網(wǎng)站備案外鏈吧怎么使用
  • 做網(wǎng)站看網(wǎng)頁效果手機網(wǎng)站排名優(yōu)化
  • 跨境電商千萬別做亞馬遜seo排名優(yōu)化工具推薦
  • 地產(chǎn)建站規(guī)劃可以投放廣告的網(wǎng)站
  • 網(wǎng)站建設(shè)服務(wù)價格表seo顧問公司
  • 網(wǎng)站icp備案新規(guī)推廣哪個平臺好
  • c 做網(wǎng)站教程百度seo教程視頻
  • 建設(shè)銀行滇龍行網(wǎng)站百度競價推廣點擊器
  • 網(wǎng)站建設(shè)深圳百度霸屏推廣
  • 做網(wǎng)站和app需要多久短網(wǎng)址在線生成
  • 找人做網(wǎng)站價格2345網(wǎng)址大全設(shè)主頁
  • 福州網(wǎng)站建設(shè)制作首選熒光信息建網(wǎng)站建設(shè)
  • 收錢碼合并的網(wǎng)站怎么做東莞seo黑帽培訓(xùn)
  • 網(wǎng)站400百度關(guān)鍵詞優(yōu)化手段
  • vps做網(wǎng)站用什么系統(tǒng)網(wǎng)站推廣途徑和推廣要點有哪些?
  • 站長工具收錄查詢女裝關(guān)鍵詞排名
  • 陜西住房與城鄉(xiāng)建設(shè)廳網(wǎng)站微信引流獲客軟件
  • 東莞南城網(wǎng)站建設(shè)公司網(wǎng)絡(luò)營銷優(yōu)化推廣
  • 網(wǎng)站建設(shè)實訓(xùn)報告建議北京網(wǎng)站制作建設(shè)公司
  • 動易網(wǎng)站安裝最新疫情最新消息
  • 做網(wǎng)站怎么買服務(wù)器嗎免費seo課程
  • 網(wǎng)站后臺管理系統(tǒng)論文廣告推廣平臺代理