Exemplo n.º 1
0
 public void Tick()
 {
     if (Input.GetKeyDown(_exitCode))
     {
         _pauseController.HandlePauseMenuManagerDidPressMenuButton();
         return;
     }
     if (Input.GetKeyDown(_restartCode))
     {
         _pauseController.HandlePauseMenuManagerDidPressRestartButton();
         return;
     }
     if (Input.GetKeyDown(_pauseToggleCode))
     {
         if (_isPaused)
         {
             _pauseController.HandlePauseMenuManagerDidPressContinueButton();
         }
         else
         {
             _pauseController.HandlePauseTriggered();
         }
         return;
     }
 }
Exemplo n.º 2
0
 private void Restart()
 {
     pauseController.HandlePauseMenuManagerDidPressRestartButton();
     GameObject.Destroy(instance);
 }