Пример #1
0
        void anyKeyMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
        {
            if (_readyToGo)
            {
                 ScreenManager.AddScreen(new MainMenuScreen(), e.PlayerIndex);
            }
           

        }
Пример #2
0
        void mainMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Are you sure you want to quit this game?";

            var confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += confirmQuitMessageBox_Accepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
 void _characterMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     switch (_characterMenuEntry.Text)
     {
         case "Character: Knight Fraser":
             Global.SelectedCharacter = Global.Character.Becky;
             break;
         case "Character: Lady Rebecca":
             Global.SelectedCharacter = Global.Character.Ben;
             break;
         case "Character: Sire Benjamin":
             Global.SelectedCharacter = Global.Character.Deacon;
             break;
         case "Character: Cleric Diakonos":
             Global.SelectedCharacter = Global.Character.Fraser;
             break;
     }
     SetMenuEntryText();
 }
Пример #4
0
 void multiplayerJoinMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new JoinScreen(), e.PlayerIndex);
 }
Пример #5
0
        /// <summary>
        /// Event handler for when the Play Game menu entry is selected.
        /// </summary>
        void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            ScreenManager.AddScreen(new CharacterSelectScreen(), e.PlayerIndex);

            //LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen());
        }
Пример #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();
 }
 void play_Selected(object sender, PlayerIndexEventArgs e)
 {
     
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen());
 }
Пример #8
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);
 }
Пример #9
0
        void local_Selected(object sender, PlayerIndexEventArgs e)
        {
            StartClient(14242, "romero");
            ScreenManager.AddScreen(new LobbyScreen(Client), PlayerIndex.One);

        }
Пример #10
0
 void back_Selected(object sender, PlayerIndexEventArgs e)
 {
     Client.Disconnect("Disconnect by user");
     Client.Shutdown("Disconnect by user");
     ExitScreen();
 }
Пример #11
0
 void confirmQuitMessageBox_Accepted(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                                                   new MainMenuScreen());
 }
        /// <summary>
        /// Full screen
        /// </summary>
        void _fullScreenMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
        {
            if (Global.IsFullScreen)
            {
                Global.IsFullScreen = false;
                Global.ScreenChanged = true;
            }
            else
            {
                Global.IsFullScreen = true;
                Global.ScreenChanged = true;
            }


            SetMenuEntryText();
        }
 /// <summary>
 /// Difficulty selection
 /// </summary>
 void _difficultyMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     switch (_difficultyMenuEntry.Text)
     {
         case "Difficulty: Easy":
             Global.SelectedDifficulty = Global.Difficulty.Normal;
             break;
         case "Difficulty: Normal":
             Global.SelectedDifficulty = Global.Difficulty.Hard;
             break;
         case "Difficulty: Hard":
             Global.SelectedDifficulty = Global.Difficulty.Insane;
             break;
         case "Difficulty: Insane":
             Global.SelectedDifficulty = Global.Difficulty.Easy;
             break;
     }
     SetMenuEntryText();
 }
        /// <summary>
        /// Gamepad selection
        /// </summary>
        void gamepadMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
        {
            switch (_currentControl)
            {
                case 0:
                    _currentControl++;
                    Global.Gamepad = true;
                    break;
                case 1:
                    _currentControl = 0;
                    Global.Gamepad = false;
                    break;
            }

            SetMenuEntryText();
        }
Пример #15
0
 void multiplayerCreateMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new LobbyScreen(), e.PlayerIndex);
 }
Пример #16
0
 void confirmExitMessageBox_Accepted(object sender, PlayerIndexEventArgs e)
 {
     ExitScreen();
 }
Пример #17
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);
 }
Пример #18
0
 void back_Selected(object sender, PlayerIndexEventArgs e)
 {
     ExitScreen();
 }