IEnumerator DeathOverlayTransition() { yield return(new WaitForSeconds(1)); yield return(new WaitForSeconds(fade.BeginFade(1))); deathOverlayUI.SetActive(true); yield return(new WaitForSeconds(fade.BeginFade(-1))); }
IEnumerator LoadingLevel(string levelToLoad) { if (loading == false) { loading = true; float fadeTime = fade.fadeSpeed; fade.doFade = true; fade.BeginFade(1); //fade out yield return(new WaitForSeconds(fadeTime)); //wait for fade Application.LoadLevel(levelToLoad); Debug.Log(levelToLoad + "is being loaded"); loading = false; } }
IEnumerator FadingLoading(string level) { float fadetime = fading.BeginFade(1); yield return(new WaitForSeconds(fadetime * 1.2f)); Application.LoadLevel(level); }
IEnumerator endingalmost() { yield return(new WaitForSeconds(5)); yield return(new WaitForSeconds(fading.BeginFade(1) * 1.2f)); Application.LoadLevel("StartPage"); }
IEnumerator ChangeScene(string scene) { float fadeTime = _Fade.BeginFade(1); yield return(new WaitForSeconds(fadeTime)); SceneManager.LoadScene(scene); }
IEnumerator FadeLevel() { Debug.Log("Attempting to fade level"); float fade_time = fade.BeginFade(1); Debug.Log(fade_time); //halt player movement until fade is done player.GetComponent <PlayerMovementController>().enabled = false; yield return(new WaitForSeconds(fade_time)); player.GetComponent <PlayerMovementController>().enabled = true; }
// Use this for initialization void Start() { StopIcon.SetActive(false); dialogue = ""; characterName = ""; pose = 0; position = "L"; playerTalking = false; parser = GameObject.Find("DialogueParser").GetComponent <DialogueParser>(); fading = GameObject.Find("Fade").GetComponent <Fade>(); fading.BeginFade(-1); lineNum = 0; }
IEnumerator StartGameRoutine() { float fadeTime = _Fade.BeginFade(-1); yield return(new WaitForSeconds(fadeTime)); ShowShipStatusMain(); ShowShipStatus(); }
private IEnumerator _FadeOutLoadLevel(string _level) { yield return(new WaitForSeconds(fade.BeginFade(1))); Application.LoadLevel(_level); }
// Use this for initialization void Start() { fading = GameObject.Find("Fade").GetComponent <Fade>(); fading.BeginFade(-1); StartCoroutine(endingalmost()); }
void Start() { FadeInstance.BeginFade(-1); }
IEnumerator SceneTransition(int scene) { yield return(new WaitForSeconds(fade.BeginFade(1))); SceneManager.LoadScene(scene, LoadSceneMode.Single); }