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

            SetMenuEntryText();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 6
0
 void MultiplayerMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new BackgroundScreen(),
                        new MultiplayerMenuScreen());
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Event handler for when the Elf menu entry is selected.
        /// </summary>
        void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            elf++;

            SetMenuEntryText();
        }
Ejemplo n.º 8
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 BlackholeBattle.BlackholeBattle());
 }
 void JoinSessionMenuSelected(object sender, PlayerIndexEventArgs e)
 {
     // join session
     ScreenManager.AddScreen(new GameplayScreen(true), e.PlayerIndex);
 }
Ejemplo n.º 10
0
 void BackMenuSelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new MainMenuScreen(), e.PlayerIndex);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 14
0
 void InstructionMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new InstructionMenuScreen(), e.PlayerIndex);
 }
Ejemplo n.º 15
0
 private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
 }
 void backSelected(object sender, PlayerIndexEventArgs e)
 {
     this.OnCancel(e.PlayerIndex);
     ScreenManager.ScreenInCounter = 0;
 }
Ejemplo n.º 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());
 }
Ejemplo n.º 18
0
 void tryAgainMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, ControllingPlayer, new GameplayScreen());
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Event handler for when the Frobnicate menu entry is selected.
        /// </summary>
        void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            frobnicate = !frobnicate;

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

            if (sfxVolume > 10)
                sfxVolume = 0;

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

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