/// <summary> /// Perform the game over logic after a player either dies or finishes the map /// </summary> /// <param name="playerDied">True if the player died, or false if the player finished themap</param> private void GameOver(bool playerDied) { // Perform the player winning logic if (!playerDied) { Player.Score.IsCompletedBonus = true; } // Check the high score if (Player.Score.TotalScore > Map.HighScore) { Map.HighScore = Player.Score.TotalScore; Player.Score.IsHighScore = true; } // Stop the game and display the game over message Stop(); _display.GameOver(); }