/// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to quit" message box. This uses the loading screen to
 /// transition from the game back to the main menu screen.
 /// </summary>
 void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new MainMenuScreen());
 }
Exemplo n.º 2
0
 public void LoadMainMenu()
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new MainMenuScreen());
 }
 /// <summary>
 /// Event handler for when the Play Movie menu entry is selected.
 /// </summary>
 void PlayMovieMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new MovieScreen());
 }
 /// <summary>
 /// Event handler for when the Instructions menu entry is selected.
 /// </summary>
 void InstructionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, e.PlayerIndex, new InstructionsScreen());
 }
 /// <summary>
 /// User has won the game, show a "You won!" message and return to the main menu
 /// </summary>
 private void WonTheGame()
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
     ScreenManager.AddScreen(new WonGameScreen(), ControllingPlayer);
 }
 /// <summary>
 /// Ends the current game and returns to the main menu.
 /// </summary>
 public void GameOver()
 {
     isGameOver = true;
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
     ScreenManager.AddScreen(new GameOverScreen(), ControllingPlayer);
 }