//スキル活性 public void UseSkill() { if (player.status.getMP() < 100) { return; } player.status.UseManapoint(100); skillActive = true; player.changeWeapon(true); }
//移動、攻撃、止まる public void UpdateStatus() { if (player.returnDeath() == true) { agent.isStopped = true; agent.ResetPath(); finding = false; waiting = 1.5f; State = StaticStrings.idle; } targetCheckCounter -= Time.deltaTime; if (targetCheckCounter <= 0) { targetCheckCounter = targetCheckTimer; State = StaticStrings.idle; } if (idle()) { stay(); } if (run()) { chasing(); } if (shooting()) { fight(); } updateAnimator(); if (skillActive) { skillCounter -= Time.deltaTime; if (skillCounter <= 0) { skillActive = false; skillCounter = skillTime; player.changeWeapon(false); } } }