private void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { ScreenManager.Game.Exit(); }
private void InstructionsMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new InstructionScreen(), e.PlayerIndex); }
private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen());; }
// Helper overload makes it easy to use OnCancel as a MenuEntry event handler. protected void OnCancel(object sender, PlayerIndexEventArgs e) { OnCancel(e.PlayerIndex); }
// This uses the loading screen to transition from the game back to the main menu screen. private void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen()); }
private void Restart(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new GameplayScreen(), ControllingPlayer); }