Пример #1
0
 //When the pause button is pressed
 public void Pause()
 {
     // Actives the paused menu that is inactive in the hierarchy
     Pausemenu.SetActive(true);
     // Disables the pause button
     Pausebutton.SetActive(false);
     //Sets the game time to zero which pauses
     Time.timeScale = 0;
 }
Пример #2
0
 //When the resume button is pressed
 public void Resume()
 {
     //The menu is then disabled
     Pausemenu.SetActive(false);
     //The pause button is activated again
     Pausebutton.SetActive(true);
     //Time is resumed
     Time.timeScale = 1;
 }
Пример #3
0
 public void pause()
 {
     PauseMenu.SetActive(true);
     Pausebutton.SetActive(false);
     Time.timeScale = 0;
 }
Пример #4
0
 public void Resume()
 {
     PauseMenu.SetActive(false);
     Pausebutton.SetActive(true);
     Time.timeScale = 1;
 }