PauseGame() public static méthode

public static PauseGame ( bool pause ) : void
pause bool
Résultat void
Exemple #1
0
 // update is called once per frame
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         GameHandler.PauseGame();
     }
 }
Exemple #2
0
 void PauseGameRoutine()
 {
     if (!gameHandler.isGameOver && !gameIsPaused)
     {
         gameHandler.PauseGame();
         mainMusic.Pause();
         GameplayUI.SetActive(false);
         PausePanel.SetActive(true);
         gameIsPaused = true;
     }
 }
Exemple #3
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (IsGamePaused())
         {
             GameHandler.ResumeGame();
         }
         else
         {
             GameHandler.PauseGame();
         }
     }
 }
 // funkcja do aktualizacji
 private void Update()
 {
     // jesli nacisniemy klawisz ESC zatrzymamy gre
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (IsGamePaused())
         {
             GameHandler.ResumeGame();
         }
         else
         {
             GameHandler.PauseGame();
         }
     }
 }
 public void PauseGame(bool showMenu)
 {
     State = GameState.Paused;
     ThePlayer.PauseGame(true);
     _gameHandler.PauseGame(showMenu);
 }