Example #1
0
        /// <summary>
        /// Lets the game respond to player input. Unlike the Update method,
        /// this will only be called when the gameplay screen is active.
        /// </summary>
        public override void HandleInput(InputState input)
        {
            if (input == null)
                throw new ArgumentNullException("input");

            if (input.IsPauseGame(ControllingPlayer))
            {
                PauseBackgroundScreen pauseBG = new PauseBackgroundScreen();
                ScreenManager.AddScreen(pauseBG, ControllingPlayer);
                ScreenManager.AddScreen(new PauseMenuScreen(pauseBG), ControllingPlayer);
            }

            gameSession.HandleInput(input);
        }
Example #2
0
 /// <summary>
 /// Constructor fills in the menu contents.
 /// </summary>
 public PauseMenuScreen(PauseBackgroundScreen pauseBG)
     : base("Pause")
 {
     BGScreen = pauseBG;
     IsPopup = true;
 }