Пример #1
0
 private void Death()
 {
     if (enemyHealthPoint <= 0)
     {
         aicc.agent.Stop();
         animator.SetTrigger("Death");
         spawner.CurrentEnemiesAmount -= 1;
         fort.addScore(1);
         isAlive = false;
     }
 }
Пример #2
0
    private void Death()
    {
        if (enemyHealthPoint <= 0)
        {
            aicc.agent.Stop();
            animator.SetTrigger("Death");
            spawner.CurrentEnemiesAmount -= 1;
            fort.addScore(1);
            isAlive = false;
            if (targetManager.targets.Find(x => x == gameObject) == gameObject)
            {
                targetManager.targets.Remove(gameObject);
            }

            StartCoroutine("deathDelay");
        }
    }