IEnumerator FadeInAnimation(string levelName) { fadeCanvas.SetActive(true); fadeAnimator.Play("FadeIn"); yield return(StartCoroutine(BridgeCorutine.WaitForRealSeconds(0.7f))); Application.LoadLevel(levelName); FadeOut(); }
IEnumerator FadeOutAnimation() { fadeAnimator.Play("FadeOut"); yield return(StartCoroutine(BridgeCorutine.WaitForRealSeconds(1f)));; fadeCanvas.SetActive(false); }