public IEnumerator EndLevel() { if (Application.loadedLevel + 1 < Application.levelCount) { yield return(StartCoroutine(UIRoot.DarkenScreen())); Application.LoadLevel(Application.loadedLevel + 1); } else { LaunchCredits(); } }