private void ResumeGameplay() { Time.timeScale = (previousTimeScale > 0) ? previousTimeScale : 1; if (unlockCursorWhileOpen && !wasCursorActive) { Tools.SetCursorActive(false); } }
protected virtual void ResumeGameplay() { if (pauseWhileOpen) { Time.timeScale = previousTimeScale; } if (unlockCursorWhileOpen && !wasCursorActive) { Tools.SetCursorActive(false); } }
protected virtual void PauseGameplay() { if (pauseWhileOpen) { previousTimeScale = Time.timeScale; Time.timeScale = 0; } if (unlockCursorWhileOpen) { wasCursorActive = Tools.IsCursorActive(); Tools.SetCursorActive(true); } }