public void DeadRestartOrGameOver(GameTime gameTime) { if (level.Mario.HasDied) { deadCount++; deadCount -= level.TotalExtraLives; if (level.Mario.Live == 0) { Sounds.PlaySound(EventSoundEffects.EventSounds.GameOver); GameOverState over = new GameOverState(); gameOverState = true; KeyBoardControls = new GameOverControls(this); Feedback.Update(level, gameTime); over.Draw(_spriteBatch); } else { rest = new LevelRestartState(); rest.CheckProgress(); level = new Level(_graphics, "level.csv", Sounds); level.DifficultyMode(MenuState.Difficulty); KeyBoardControls = new KeyBoardControls(this); GamePadControls = new GamePadControls(this); level.Mario.Live -= deadCount; rest.Draw(_spriteBatch); MediaPlayer.Resume(); } } }
public void WonGame() { if (level.Mario.WonGame) { WinningGameState win = new WinningGameState(); win.Draw(_spriteBatch); KeyBoardControls = new GameOverControls(this); } }