public void EndAttack() { motor.StartNavAgent(navMeshAgent); attacking = false; if (attack.PlayerInRange(player, transform, attackRange)) { attack.HitPlayer(player, damageAmount); } }