public void Death() { if (_health <= 0) { _enemyAnimator.Death(); } }
private void Dead() { navMeshAgent.velocity = Vector3.zero; navMeshAgent.isStopped = true; enemyController.enabled = false; enemyAnimator.Death(); StartCoroutine(DeathSound()); }
/// <summary> ///If the enemy dies /// </summary> void Die() { animator.Death(); ScoreBehavior.Score += 10; GetComponent <Collider>().enabled = false; GetComponent <EnemyMovementBehavior>().enabled = false; StartCoroutine(RemoveEnemyAfterTime(3.0f)); }
void DoTheMethod() { var go = Fsm.GetOwnerDefaultTarget(gameObject); if (go == null) { return; } theScript.Death(); }
public override void AdjustHealth(int health) { base.AdjustHealth(health); if (m_HealthCount <= 0) { m_Animator.Death(); } else { m_Animator.Shot(); } }