public void AttackGun() { gun.attack = attackGun; gun.Shot(); AudioSource.PlayClipAtPoint(shotClip, transform.position, 1f); }
public void AttackA() { //根据是否有远程武器进行不同判定 if (gun != null) { gun.attack = attackgun; gun.Shot(); GameObject enemy = RecentEnemy(attackDistance); Changedirection(enemy, normalAttack); } else { GameObject enemy = RecentEnemy(attackDistance); Changedirection(enemy, normalAttack); } if (SwardClip != null) { AudioSource.PlayClipAtPoint(SwardClip, transform.position, 1f); } }
public void AttackGun() { PlayGunAttackEffect(); gun.Shot(); }
public void AttackGun() //用枪攻击 { weaponGun.attack = attackGun; AudioSource.PlayClipAtPoint(gunShot, this.transform.position, 1f);//播放打枪的音效 weaponGun.Shot(); }