Example #1
0
 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);
 }
        /// <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)
        {
            GameStateManagement.SideScrollGame.SideScrollGame.main.player = null;
            if (GameStateManagement.SideScrollGame.SideScrollGame.main.IsNetwork)
            {
                GameStateManagement.SideScrollGame.SideScrollGame.main.client.Disconnect("exiting");
                GameStateManagement.SideScrollGame.SideScrollGame.main.otherPlayers.Clear();
            }

            LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                                                           new MainMenuScreen());
        }
Example #3
0
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected.
        /// </summary>
        /// 
        void RestartGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Do you want to play LOCAL or NETWORK";

            RestartLocalNetwork restartGame = new RestartLocalNetwork(removeScreenGameplay, message);

            restartGame.Local += LocalNetworkGame;
            restartGame.Network += LocalNetworkGame;

            ScreenManager.AddScreen(restartGame, ControllingPlayer);
        }
Example #4
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

            SetMenuEntryText();
        }
Example #5
0
        /// <summary>
        /// Event handler for when the Ungulate menu entry is selected.
        /// </summary>
        void UngulateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            currentUngulate++;

            if (currentUngulate > Ungulate.Llama)
                currentUngulate = 0;

            SetMenuEntryText();
        }
Example #6
0
 void MultiplayerMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new BackgroundScreen(),
                        new MultiplayerMenuScreen());
 }
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new BlackholeBattle.BlackholeBattle());
 }
 void JoinSessionMenuSelected(object sender, PlayerIndexEventArgs e)
 {
     // join session
     ScreenManager.AddScreen(new GameplayScreen(true), e.PlayerIndex);
 }
 void BackMenuSelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new MainMenuScreen(), e.PlayerIndex);
 }
Example #11
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);
 }
Example #12
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);
 }
Example #13
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new GameplayScreen(1));
 }
 void InstructionMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new InstructionMenuScreen(), e.PlayerIndex);
 }
Example #15
0
 private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
 }
 void backSelected(object sender, PlayerIndexEventArgs e)
 {
     this.OnCancel(e.PlayerIndex);
     ScreenManager.ScreenInCounter = 0;
 }
Example #17
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new GameplayScreen());
 }
 void tryAgainMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, ControllingPlayer, new GameplayScreen());
 }
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

            SetMenuEntryText();
        }
Example #20
0
 /// <summary>
 /// Gestionnaire d'évènement lors de la sélection de l'entrée de menu Jouer
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     IsMouseVisible(false);
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen());
 }
 void CreditsEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new CreditsScreen(), e.PlayerIndex);
 }
        void SfxMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            sfxVolume++;

            if (sfxVolume > 10)
                sfxVolume = 0;

                        ScreenManager.Sound.SetCategoryVolume(sfxVolume, bgmVolume);
            SetMenuEntryText();
        }
Example #23
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void HowtoplayMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new HowtoplayMenuScreen(), e.PlayerIndex);
 }
        /// <summary>
        /// Event handler for when the Ungulate menu entry is selected.
        /// </summary>
        //void UngulateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        //{
        //    currentUngulate++;
        //    if (currentUngulate > Ungulate.Llama)
        //        currentUngulate = 0;
        //    SetMenuEntryText();
        //}
        /// <summary>
        /// Event handler for when the Language menu entry is selected.
        /// </summary>
        //void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        //{
        //    currentLanguage = (currentLanguage + 1) % languages.Length;
        //    SetMenuEntryText();
        //}
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        //void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        //{
        //    frobnicate = !frobnicate;
        //    SetMenuEntryText();
        //}
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        //void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        //{
        //    elf++;
        //    SetMenuEntryText();
        //}
        void SplitScreenMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            currentSplitScreen++;

            if (currentSplitScreen > SplitScreen.Vertical)
                currentSplitScreen = 0;

            SetMenuEntryText();
        }
Example #25
0
        /// <summary>
        /// Event handler for when the Language menu entry is selected.
        /// </summary>
        void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            currentLanguage = (currentLanguage + 1) % languages.Length;

            SetMenuEntryText();
        }
Example #26
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();
 }
Example #27
0
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
Example #28
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new CharacterMenuScreen());
     ScreenManager.ScreenInCounter = 1;
 }
 /// <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());
 }
Example #30
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);
     ScreenManager.ScreenInCounter = 0;
 }
Example #31
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 LocalNetworkGame(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                                                    new MainMenuScreen());
 }
Example #32
0
 void CreditsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new CreditsMenuScreen());
     ScreenManager.ScreenInCounter = 4;
 }
Example #33
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);
 }
        /// <summary>
        /// Event handler for when the Language menu entry is selected.
        /// </summary>
        void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            currentLanguage = (currentLanguage + 1) % languages.Length;

            SetMenuEntryText();
        }
Example #35
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();
 }
Example #36
0
 //void UngulateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 //{
 //    currentUngulate++;
 //    if (currentUngulate > Ungulate.Llama)
 //        currentUngulate = 0;
 //    SetMenuEntryText();
 //}
 //void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 //{
 //    currentLanguage = (currentLanguage + 1) % languages.Length;
 //    SetMenuEntryText();
 //}
 void MovementMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     MoveArrows = !MoveArrows;
     SetMenuEntryText();
 }