예제 #1
0
 public void Death()
 {
     if (_health <= 0)
     {
         _enemyAnimator.Death();
     }
 }
예제 #2
0
 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();
        }
예제 #5
0
    public override void AdjustHealth(int health)
    {
        base.AdjustHealth(health);

        if (m_HealthCount <= 0)
        {
            m_Animator.Death();
        }
        else
        {
            m_Animator.Shot();
        }
    }