Пример #1
0
        public override void HandleInput(InputState input)
        {
            PlayerIndex playerIndex;

            if (input.IsMenuSelect(ControllingPlayer, out playerIndex))
            {
                if (Accepted != null)
                {
                    Accepted(this, new PlayerIndexEventArgs(playerIndex));
                }

                if (lvl == 1)
                {
                    LoadingScreen.Load(ScreenManager, true, playerIndex,
                                       new Level1(score));
                    this.ExitScreen();
                }
                else
                {
                    if (lvl == 2)
                    {
                        LoadingScreen.Load(ScreenManager, true, playerIndex,
                                           new Level2(score));
                        this.ExitScreen();
                    }
                    else
                    {
                        if (lvl == 3)
                        {
                            LoadingScreen.Load(ScreenManager, true, playerIndex,
                                               new Level3(score));
                            this.ExitScreen();
                        }
                    }
                }
            }
        }
Пример #2
0
 void BackSelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new MainMenuScreen());
 }
Пример #3
0
 void FourGameSelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new FourPlayer());
     this.ExitScreen();
 }
Пример #4
0
 void ThreeGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new ThreePlayer());
     this.ExitScreen();
 }
Пример #5
0
 void playMultiGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new MultiPlayerMenu());
 }
Пример #6
0
 void playSingleGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new textScreen(1, 0));
     this.ExitScreen();
 }
Пример #7
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());
 }