Exemplo n.º 1
0
 public void PauseGame()
 {
     isPaused = true;
     OnPauseEvent?.Invoke(isPaused);
     Time.timeScale = 0;
     pausePanel.SetActive(true);
 }
Exemplo n.º 2
0
 public void UnpauseGame()
 {
     isPaused = false;
     OnPauseEvent?.Invoke(isPaused);
     Time.timeScale = 1;
     pausePanel.SetActive(false);
 }
Exemplo n.º 3
0
    public void OnPause(InputAction.CallbackContext context)
    {
        if (!context.performed)
        {
            return;
        }

        OnPauseEvent?.Invoke();
    }