/// <summary> /// toggles the Time-Pausescreen overlay /// </summary> void TogglePause() { Slider slider = BreakScreen.transform.GetComponentInChildren <Slider> (); if (MenuPause) { Highlight.SetActive(true); FManager.StopPause(); MenuPause = false; TimeRunning = true; FManager.RevertToFrameID((int)slider.value); } else { Highlight.SetActive(false); FManager.StartPause(); slider.maxValue = FManager.GetHighestID(); slider.value = slider.maxValue; MenuPause = true; TimeRunning = false; } Debug.Log("TogglePause"); }