Exemplo n.º 1
0
 public void ActivateEnemyes(GameObject[] enemyes, bool needToCountEnemyes)
 {
     if (needToCountEnemyes)
     {
         AmountOfEnemyes += enemyes.Length;
     }
     for (int i = 0; i < enemyes.Length; i++)
     {
         if (enemyes[i].GetComponent <EnemyController>() != null)
         {
             enemyes[i].GetComponent <EnemyController>().ActivateEnemy();
             _healthController.AddEnemyToList(enemyes[i].GetComponent <EnemyController>());
         }
         else
         {
             enemyes[i].GetComponent <ThrowingEnemyController>().ActivateEnemy();
             _healthController.AddEnemyToList(enemyes[i].GetComponent <ThrowingEnemyController>());
         }
     }
 }