/// <summary>
        /// Pause the game.
        /// </summary>
        private void PauseCurrentGame()
        {
            // Pause sounds
            AudioManager.PauseResumeSounds(false);

            // Set pause screen
            ScreenManager.AddScreen(new BackgroundScreen("pauseBackground"), null);
            ScreenManager.AddScreen(new PauseScreen(), null);
        }
Beispiel #2
0
        /// <summary>
        /// Respond to "Return" Item Selection
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ReturnGameMenuEntrySelected(object sender, EventArgs e)
        {
            AudioManager.PauseResumeSounds(true);

            foreach (GameScreen screen in ScreenManager.GetScreens())
            {
                if (!(screen is GameplayScreen))
                {
                    screen.ExitScreen();
                }
            }
        }
        /// <summary>
        /// Pause the game.
        /// </summary>
        private void PauseCurrentGame()
        {
            debugSystem.FpsCounter.Visible = false;
            debugSystem.TimeRuler.Visible  = false;
            debugSystem.TimeRuler.ShowLog  = false;

            // Pause sounds
            AudioManager.PauseResumeSounds(false);

            // Set pause screen
            ScreenManager.AddScreen(new BackgroundScreen("pauseBackground"), null);
            ScreenManager.AddScreen(new PauseScreen(), null);
        }