IEnumerator WaitForFade() { cinematicFade.FadeIn(); yield return(new WaitForSeconds(1f)); cinematicFade.FadeOut(); PlayTimeline(); }
public void PauseGame() { if (_isPaused || !PausingAllowed) { return; } _cachedTimeScale = Time.timeScale; Time.timeScale = 0f; _cachedCursorMode = Util.CursorMode.GetCurrent(); Util.CursorMode.Default.Apply(); PauseMenu.Menu.gameObject.SetActive(true); PauseMenu.Menu.SetVisible(); if (GameManager.Instance.UsingGamepadControls()) { PauseMenu.FirstSelected.Select(); PauseMenu.FirstSelected.OnSelect(null); } PauseInterface.gameObject.SetActive(true); PauseInterface.FadeIn(); FadePostProcessingWeight(1f, PostProcessingFadeSpeed); _currentMenu = PauseMenu; _isPaused = true; }
public void LoadNextScene() { if (fader) { fader.FadeIn(); if (musicFader) { musicFader.FadeOut(0f, musicFader.fadeSpeed); } StartCoroutine(WaitToLoad(fadeWait, SceneManager.GetActiveScene().buildIndex + 1)); } else { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); } }
private void Internal_ShowMessage(string message, float displayTime) { if (IsShowingMessage) { fader.FadeOut(() => { text.text = message; fader.FadeIn(); _timeLeftUntilFadeOut = displayTime; }); } else { text.text = message; fader.FadeIn(); _timeLeftUntilFadeOut = displayTime; } IsShowingMessage = true; }
IEnumerator ch() { black.SetActive(true); FadeUI.FadeIn(black); yield return(new WaitForSeconds(0.2f)); toUnload.SetActive(false); toLoad.SetActive(true); FadeUI.FadeOut(black); yield return(new WaitForSeconds(0.2f)); black.SetActive(false); }
//actually starts void StartMonologue() { //enable text comps if (monoReader.usesTMP) { monoReader.the_Text.enabled = true; } else { monoReader.theText.enabled = true; } //textback if (textBack) { textBack.FadeIn(); if (animateTextback) { animateTextback.active = true; } } //player ref GameCamera cam = camManager.currentCamera; //currentPlayer = cam.transform.parent.gameObject; //transition to mono cam if (monoCam != null) { camManager.Set(monoCam); } //lock player movement if (allMyMonologues[currentMonologue].lockPlayer) { } //begin mono inMonologue = true; //start the typing! monoReader.SetTypingLine(); }
IEnumerator ch() { FadeUI.FadeIn(black); yield return(new WaitForSeconds(0.5f)); if (toUnload != "") { SceneManager.UnloadSceneAsync(toUnload); } yield return(new WaitForSeconds(delayTime + 1f)); FadeUI.FadeOut(black); if (toLoad != "") { SceneManager.LoadScene(toLoad, LoadSceneMode.Additive); } isChanging = false; yield return(new WaitForSeconds(0.4f)); black.SetActive(false); }
public void OpenMenu() { fadeUI.FadeIn(); Invoke("ChangeTimeScale", fadeUI.fadeTime + fadeUI.startDelay); }