public IEnumerator Downfall() { backgroundFade.CrossFadeAlpha(1.0f, secondsToDownfall / 3.0f, false); yield return(new WaitForSeconds(secondsToDownfall / 3.0f)); SceneManager.LoadScene("Fogueira", LoadSceneMode.Additive); yield return(new WaitForSeconds(secondsToDownfall / 3.0f)); storyMaster.text = GameObject.FindGameObjectWithTag("Dialog Box").GetComponent <TextMeshProUGUI>(); cutscener = GameObject.FindGameObjectWithTag("Cutscener").GetComponent <Cutscener>(); if (dayBehaviour.DayCounter == 2) { peopleBehaviour.SpawnNewcomers(1); } if (dayBehaviour.DayCounter == 4) { peopleBehaviour.SpawnNewcomers(2); } updateAllMoods(); cutscener.StartCutscene(dayBehaviour.DayCounter, ref storyMaster); backgroundFade.CrossFadeAlpha(0.0f, secondsToDownfall / 3.0f, false); AdvanceDayCamp(); yield return(new WaitForSeconds(secondsToDownfall / 3.0f)); storyMaster.passStory = true; }
void Awake() { SingleRef = this; }