Beispiel #1
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex);
 }
Beispiel #2
0
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to exit" message box.
 /// </summary>
 void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.Game.Exit();
 }
Beispiel #3
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new ZoneSelectionScreen(), e.PlayerIndex);
 }
Beispiel #4
0
 /// Event handler for when a menu entry is selected.
 /// </summary>
 void MenuEntrySelected(object sender, PlayerIndexEventArgs e, int currentLevel, int currentZone)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new GameplayScreen(currentZone, currentLevel));
 }
Beispiel #5
0
 /// <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());
 }
Beispiel #6
0
 void RedoLevelSelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new GameplayScreen(zoneNo, levelNo));
 }
Beispiel #7
0
 /// <summary>
 /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
 /// </summary>
 protected void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     OnCancel(e.PlayerIndex);
 }