IEnumerator Start() { //Fade in menu canvas group yield return(new WaitForSeconds(initialWait)); StartCoroutine(Fader.Canvas_FadeToOpaque(cvsMenu, fadeSpeed)); }
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 FadeInNewCanvas(MenuStates targetState) { yield return(StartCoroutine(Fader.Canvas_FadeToOpaque(GetCanvasBasedOnState(targetState), fadeSpeed))); }