IEnumerator fadeOut() { Debug.Log("Fading Out... Start"); if (fadeMusic) { Jukebox.GetJukebox().FadeOut(); } GameObject.FindObjectOfType <Player>().doPlayerUpdates = false; for (float i = 0; i < 255; i += transitionSpeed) { fadeImage.color = new Color32(0, 0, 0, (byte)i); yield return(null); } GameObject.FindObjectOfType <Player>().doPlayerUpdates = false; switchNow = true; Debug.Log("Fading Out... End"); }
public override void OnDeath() { Jukebox.GetJukebox().Stop(); SceneManager.LoadScene("EndSplashScreen"); }