private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { if (isGamePaused()) { ResumeGame(); PauseWindow.HidePauseWindowStatic(); } else { PauseGame(); PauseWindow.ShowPauseWindowStatic(); } } }
private void PauseGame() { isPaused = true; PauseWindow.ShowPauseWindowStatic(); Time.timeScale = 0.0f; }