コード例 #1
0
 public void Update(GameTime gameTime)
 {
     gameUI.Update(gameTime);
     if (gameScreenStatus == GameScreenStatus.inPause)
     {
         pauseMenu.Update(gameTime);
     }
     else if (gameScreenStatus == GameScreenStatus.inGame)
     {
         if (GlobalControls.PausePressed() || PlayerControls.PausePressed(ControlsConfig.keyboardControllerIndex))
         {
             PauseGame();
         }
     }
 }
コード例 #2
0
 public static bool PausePressed()
 {
     if (CurrentlySettingControl())
     {
         //When setting control in controls menu, don't want to unpause the game
         return(false);
     }
     foreach (int controllerIndex in ControlsConfig.GetAllControllerIndexes())
     {
         if (PlayerControls.PausePressed(controllerIndex))
         {
             return(true);
         }
     }
     return(false);
 }