Ejemplo n.º 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();
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 void BackSelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new MainMenuScreen());
 }
Ejemplo n.º 3
0
 void FourGameSelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new FourPlayer());
     this.ExitScreen();
 }
Ejemplo n.º 4
0
 void ThreeGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new ThreePlayer());
     this.ExitScreen();
 }
Ejemplo n.º 5
0
 void playMultiGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(),
                        new MultiPlayerMenu());
 }
Ejemplo n.º 6
0
 void playSingleGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new textScreen(1, 0));
     this.ExitScreen();
 }
Ejemplo n.º 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());
 }