/// <summary> /// coroutine that Kills the player, stops the camera and resets the game points /// </summary> /// <returns>The player I.</returns> /// <param name="player">Player.</param> protected virtual IEnumerator killPlayerIE(PlayableCharacter player) { LevelManager.Instance.CurrentPlayablePlayers.Remove(player); player.Die(); yield return(new WaitForSeconds(0.0f)); //if last player trigger all players are dead coroutine if (LevelManager.Instance.CurrentPlayablePlayers.Count == 0) { AllPlayersDead(); } }
/// <summary> /// coroutine that Kills the player, stops the camera and resets the game points /// </summary> /// <returns>The player I.</returns> /// <param name="player">Player.</param> protected virtual IEnumerator killPlayerIE (PlayableCharacter player) { LevelManager.Instance.CurrentPlayablePlayers.Remove (player); player.Die (); yield return new WaitForSeconds (0.0f); //if last player trigger all players are dead coroutine if (LevelManager.Instance.CurrentPlayablePlayers.Count == 0) { AllPlayersDead (); } }