Пример #1
0
 //Pause Screen is dismissed with Space!
 public override void HandleKeys(InputHelper aInputHelper, ISceneManager aSceneManager)
 {
     if (aInputHelper.IsNewPress(Keys.Space))
     {
         aSceneManager.HideOverlay();
     }
 }
Пример #2
0
        public override void HandleKeys(InputHelper aInputHelper, ISceneManager aSceneManager)
        {
            //Close/Quit :)

            if(aInputHelper.IsNewPress(Keys.Q) || aInputHelper.IsNewPress(Keys.Enter) || aInputHelper.IsNewPress(Keys.Y))
            {
                Game1.ForceClose();
                return;
            }

            //We don't want to close quit - return to previous screen
            if (aInputHelper.IsNewPress(Keys.N) || aInputHelper.IsNewPress(Keys.Back))
            {
                aSceneManager.HideOverlay();
                return;
            }
        }