public void Resume() { if (lose) { return; } paused = false; PausePanel?.SetActive(false); RipPanel?.SetActive(false); Time.timeScale = 1; }
public void Pause(bool GameOver = false) { if (lose) { return; } lose = GameOver; paused = !paused; Time.timeScale = paused ? 0 : 1; PausePanel?.SetActive(paused && !GameOver); RipPanel?.SetActive(paused && GameOver); }