Ejemplo n.º 1
0
        /// <summary>
        /// When the user cancels the main menu, ask if they want to exit the menu.
        /// </summary>
        protected override void OnCancel(PlayerIndex playerIndex)
        {
            const string message = "Are you sure you want to exit the game?";

            MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message);

            confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmExitMessageBox, playerIndex);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Event handler for when the Quit Program 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.º 3
0
        protected void storyMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "The year is 4362. Three elite members of the\n" +
                                   "Colonial Superheroes Coalition for Independence (CSCI)\n" +
                                   "embark on a mission to rescue their squad commander Tyler,\n" +
                                   "code named Portal. The Blatant Supervillains of Destruction (BSOD)\n" +
                                   "threaten to destroy one of the 3 colonized planets\n" +
                                   "(Mars, Neptune, or Venus) with a Planet Destructo Ray.\n" +
                                   "Commander Portal was sent on a reconnaissance mission to one\n" +
                                   "of these planets to discover enemy plans, but the enemy saw\n" +
                                   "him coming, and Tyler teleported into a trap!\n\n" +
                                   "The mission was only supposed to last one week. It has been three.\n" +
                                   "It's time to rescue the squad commander, or die trying.\n" +
                                   "Retrace his footsteps, find portals he has left behind,\n" +
                                   "and save the day!";

            MessageBoxScreen viewedStoryMsgBox = new MessageBoxScreen(message, false);

            ScreenManager.AddScreen(viewedStoryMsgBox, 0);
        }
Ejemplo n.º 4
0
        protected void InstructionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "How to Play the Game\n\n" +
                                   "Pause...........Escape\n" +
                                   "Run L..........A\n" +
                                   "Run R..........D\n" +
                                   "Jump............Spacebar\n" +
                                   "Shoot............L-Mouse Btn\n" +
                                   "Shield...........R-Mouse Btn\n" +
                                   "Hero 1..........1\n" +
                                   "Hero 2..........2\n" +
                                   "Hero 3..........3\n\n" +
                                   "Green powerups revive dead allies, blue powerups give hero health,\n" +
                                   "and red powerups grant invincibility for a short time.\n\n" +
                                   "Make it to the portal at the end of the level before time is up.\n" +
                                   "Game over if all heroes are dead.\n" +
                                   "Good luck soldier!";

            MessageBoxScreen viewedInstructionsMsgBox = new MessageBoxScreen(message, false);

            ScreenManager.AddScreen(viewedInstructionsMsgBox, 0);
        }