Exemplo n.º 1
0
 //called on DestroyObject script
 public void Dying()
 {
     if (isAlive)
     {
         isAlive = false;
         SpawnController.Instance.actualEnemiesAlive--;
         gameObject.GetComponent <CapsuleCollider>().enabled = false;
         animationController.EnemyDiesAnimation();
         agent.enabled = false;
     }
 }