Exemplo n.º 1
0
 public void Pause()
 {
     if (pauseScreen == null)
     {
         inputBlocker = Primitives.CreateInputBlocker();
         inputBlocker.SetDownAction(() => { Unpause(); Sounds.PlaySound(Sounds.deselect); });
         Util.SetZ(inputBlocker.gameObject, Util.ZLayer.Blocker);
         pauseScreen    = PauseMaker.CreatePauseScreen();
         Time.timeScale = 0;
     }
     inputBlocker.gameObject.SetActive(true);
     pauseScreen.SetActive(true);
     Game.paused = true;
 }