IEnumerator Start() { yield return(new WaitForSeconds(initialWait)); yield return(StartCoroutine(Fader.Canvas_FadeToOpaque(cvsGrp, fadeSpeed))); yield return(new WaitForSeconds(stayVisibleDuration)); yield return(StartCoroutine(Fader.Canvas_FadeToTransparent(cvsGrp, fadeSpeed))); Application.LoadLevel(nextSceneName); }
void ReferenceCoroutines() { fadeToOpaque = Fader.Canvas_FadeToOpaque(cvsGrp, fadeSpeed); fadeToTransparent = Fader.Canvas_FadeToTransparent(cvsGrp, fadeSpeed); }
IEnumerator FadeOutCurrentCanvas() { yield return(StartCoroutine(Fader.Canvas_FadeToTransparent(GetCanvasBasedOnState(currentState), fadeSpeed))); }