Beispiel #1
0
 /// <summary>
 /// Updates all enemies
 /// </summary>
 /// <param name="aPlayer">Active player</param>
 public static void Update(Player.Player aPlayer)
 {
     for (int i = myEnemies.Count; i > 0; i--)
     {
         if (myEnemies[i - 1].GetHealth() <= 0)
         {
             aPlayer.AddEXP(myEnemies[i - 1].GetEXPToGive());
             myEnemies.RemoveAt(i - 1);
         }
         else
         {
             myEnemies[i - 1].DealDamage(aPlayer);
         }
     }
 }