public void StartPlaylist() { active = true; GameObject go = Instantiate(transitionScreen) as GameObject; ngsm = go.GetComponent <NextGameScreenManager>(); ngsm.nextGameText.text = playlist[currentIndex] + "\ncomenzará en"; StartCoroutine(NextGameScreen(timeBetweenGames)); Debug.Log("termina nextgame"); }
private IEnumerator DelayedNextGameScreen() { Debug.Log("crear pantalla"); yield return(new WaitForSeconds(timeToScreen)); GameObject go = Instantiate(transitionScreen) as GameObject; ngsm = go.GetComponent <NextGameScreenManager>(); ngsm.nextGameText.text = playlist[currentIndex] + "\ncomenzará en"; StartCoroutine(NextGameScreen(timeBetweenGames)); Debug.Log("termina nextgame"); }