예제 #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);
 }
예제 #2
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)
        {
            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());
        }
예제 #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);
        }
예제 #4
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

            SetMenuEntryText();
        }
예제 #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();
        }
예제 #6
0
 void MultiplayerMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new BackgroundScreen(),
                        new MultiplayerMenuScreen());
 }
예제 #7
0
        /// <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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #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));
 }
예제 #14
0
 void InstructionMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new InstructionMenuScreen(), e.PlayerIndex);
 }
예제 #15
0
 private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
 }
 void backSelected(object sender, PlayerIndexEventArgs e)
 {
     this.OnCancel(e.PlayerIndex);
     ScreenManager.ScreenInCounter = 0;
 }
예제 #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());
 }
예제 #18
0
 void tryAgainMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, ControllingPlayer, new GameplayScreen());
 }
예제 #19
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

            SetMenuEntryText();
        }
예제 #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());
 }
예제 #21
0
 void CreditsEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new CreditsScreen(), e.PlayerIndex);
 }
예제 #22
0
        void SfxMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            sfxVolume++;

            if (sfxVolume > 10)
                sfxVolume = 0;

                        ScreenManager.Sound.SetCategoryVolume(sfxVolume, bgmVolume);
            SetMenuEntryText();
        }
예제 #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);
 }
예제 #24
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();
        //}
        /// <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();
        }
예제 #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();
        }
예제 #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();
 }
예제 #27
0
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
예제 #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;
 }
예제 #29
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());
 }
예제 #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;
 }
예제 #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());
 }
예제 #32
0
 void CreditsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new CreditsMenuScreen());
     ScreenManager.ScreenInCounter = 4;
 }
예제 #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);
 }
예제 #34
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();
        }
예제 #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();
 }
예제 #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();
 }