Beispiel #1
0
 public void TogglePause()
 {
     if (!isPaused)
     {
         pauseOverlay.SetActive(true);
         isPaused = true;
         musicPlayer.ToggleMuteInput(isPaused);
         playerKart.ToggleMuteInput(isPaused);
         Time.timeScale = 0;
     }
     else if (isPaused)
     {
         pauseOverlay.SetActive(false);
         isPaused = false;
         musicPlayer.ToggleMuteInput(isPaused);
         playerKart.ToggleMuteInput(isPaused);
         Time.timeScale = 1;
     }
 }