public void GameOverMenu(bool openMenu_) { if (!_menuOpen && openMenu_) { _cg.blocksRaycasts = true; Time.timeScale = 0; StartCoroutine(_cg.FadeInCG(1.2f, true)); _menuOpen = true; } else if (!openMenu_ && _menuOpen) { _cg.blocksRaycasts = false; Time.timeScale = 1; StartCoroutine(_cg.FadeOutCG(1.2f, true)); _menuOpen = false; } }
public void ToggleSettings(bool openMenu_) { if (openMenu_ && !_menuOpen) { _cg.blocksRaycasts = true; Time.timeScale = 0.0f; _menuOpen = true; StartCoroutine(_cg.FadeInCG(0.2f, true)); StartCoroutine(PlayerInput()); } else if (!openMenu_ && _menuOpen) { StartCoroutine(_cg.FadeOutCG(0.2f, true)); Time.timeScale = 1; _cg.blocksRaycasts = false; _menuOpen = false; StopCoroutine(PlayerInput()); } }
public void FadeFromScene() { StartCoroutine(_cg.FadeOutCG(_fadeDuration, true)); }