public BedroomState[] states; //The states of the bedroom stored by thier state values. protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode) { base.OnSceneLoaded(scene, mode); ConfigureBedroom(); StartCoroutine(OverTime.ChangeOpacity(fadeImage, 255f, 0f, fadeDuration, null)); }
private IEnumerator EndGame() { StartCoroutine(OverTime.ChangeOpacity(fade, 1f, 255f, 0.1f, null)); GetComponent <AudioSource>().Play(); music.Pause(); ambience.Pause(); yield return(new WaitForSeconds(3f)); Application.Quit(); }
/** * Load the set transition scene, and unload the current one. */ public virtual void TransitionScenes(bool save) { if (fadeImage != null) { StartCoroutine(OverTime.ChangeOpacity(fadeImage, 1f, 255f, 0.1f, null)); } if (toDisable != null) { toDisable.gameObject.SetActive(false); } StartCoroutine(PlayClipAndWait(LoadNextScene, save)); }