Ejemplo n.º 1
0
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected
        /// </summary>
        void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Are you sure you want to quit this game?";

            MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Event handler for when the user selectes ok on the "are you sure"
 /// 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());
 }
Ejemplo n.º 3
0
 void HighScoresEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     //ScreenManager.AddScreen(new HighScoresScreen(), e.PlayerIndex);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new GameMenuScreen(), e.PlayerIndex);
 }
Ejemplo n.º 5
0
 void CreditsEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new CreditsScreen(), e.PlayerIndex);
 }
Ejemplo n.º 6
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();
 }
Ejemplo n.º 7
0
 void twentyEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     // Create and load a 20x20 maze screen
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new GameplayScreen(20));
 }
Ejemplo n.º 8
0
 void fiveEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new GameplayScreen(5));
 }
Ejemplo n.º 9
0
 void fifteenEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     // Create and load a 15x15 maze screen
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
            new GameplayScreen(15));
 }