/// <summary> /// Called when the player is killed. /// </summary> /// <param name="killedBy"> /// The enemy who killed the player. This is null if the player was not killed by an /// enemy, such as when a player falls into a hole. /// </param> private void OnPlayerKilled(int playerIndex, Enemy killedBy) { Player.OnKilled(playerIndex, killedBy); // reset the ennemies but not for ghosts if (playerIndex == 0) { foreach (Enemy enemy in enemies) { enemy.Reset(); } } }
/// <summary> /// Called when the player is killed. /// </summary> /// <param name="killedBy"> /// The enemy who killed the player. This is null if the player was not killed by an /// enemy, such as when a player falls into a hole. /// </param> private void OnPlayerKilled(Enemy killedBy) { Player.OnKilled(killedBy); }