예제 #1
0
        void ResolutionMenuEntryIncrement(object sender, PlayerIndexEventArgs e)
        {
            if (ScreenManager.preferredHeight == 720)
            {
                ScreenManager.preferredHeight = 1080;
                ScreenManager.preferredWidth = 1920;

                GameServices.GetService<GraphicsDeviceManager>().PreferredBackBufferWidth = ScreenManager.preferredWidth;
                GameServices.GetService<GraphicsDeviceManager>().PreferredBackBufferHeight = ScreenManager.preferredHeight;
                GameServices.GetService<GraphicsDeviceManager>().ApplyChanges();

                ScreenManager.initParameters();
            }
        }
예제 #2
0
 void PlayersMenuEntryDecrement(object sender, PlayerIndexEventArgs e)
 {
     if (_playersCountIndex > 0)
     {
         _playersCountIndex--;
     }
 }
예제 #3
0
 void PlayersMenuEntryIncrement(object sender, PlayerIndexEventArgs e)
 {
     if (_playersCountIndex < numberOfPlayers.Length - 1)
     {
         _playersCountIndex++;
     }
 }
예제 #4
0
 void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.GetScreen<OptionsMenuScreen>().ShowOptions(numberOfPlayers[_playersCountIndex]);
     ScreenManager.ShowScreen<OptionsMenuScreen>();
 }
예제 #5
0
 void CreditsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.ShowScreen<CreditsScreen>();
 }
예제 #6
0
 /// <summary>
 /// Event handler for when the Quit Game menu entry is selected.
 /// </summary>
 void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(QuitDialog, ControllingPlayer);
 }
예제 #7
0
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to quit" message box. Go back to the main menu screen.
 /// </summary>
 void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.QuitGame();
     GameServices.GetService<SoundManager>().StopSong();
 }
예제 #8
0
        public void RankScreenAccepted(object sender, PlayerIndexEventArgs e)
        {
            soundManager.StopSong();

            ScreenManager.QuitGame();
        }