Exemplo n.º 1
0
        /// <summary>
        /// Event handler for our Select Level button.
        /// </summary>
        private void newGamePressed(object sender, PlayerIndexEventArgs e)
        {
            // We use the loading screen to move to our level selection screen because the
            // level selection screen needs to load in a decent amount of level art. The Load
            // method will cause all current screens to exit, so to enable us to be able to
            // easily come back from the level select screen, we must also pass down the
            // background and main menu screens.

            LoadingScreen.Load(
                ScreenManager,
                true,
                e.PlayerIndex,
                new BackgroundScreen(), new MainMenuScreen(), new LevelSelectScreen());
        }
Exemplo n.º 2
0
 void exitScreen(object sender, PlayerIndexEventArgs e)
 {
     ExitScreen();
 }
Exemplo n.º 3
0
 private void goPressed(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, PlayerIndex.One, new BattleFieldScreen());
 }
Exemplo n.º 4
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);
 }
Exemplo n.º 5
0
 private void exitCancel(object sender, PlayerIndexEventArgs e)
 {
     OnCancel(e.PlayerIndex);
 }
Exemplo n.º 6
0
 private void alertOk(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.Game.Exit();
 }
Exemplo n.º 7
0
 private void alertCancel(object sender, PlayerIndexEventArgs e)
 {
 }