protected override void Awake() { base.Awake(); intros = new Queue <IntroPhase>(); UI = UIManager.Instance.LoadUI <UIIntro>("UI_Prefabs/Introduction/Intro", FindChild("UI", transform)); Transform phasesTransform = FindChild("Phase", transform); for (int cnt = 0; cnt < phasesTransform.childCount; ++cnt) { IntroPhase phase = FindComponent <IntroPhase>(phasesTransform.GetChild(cnt)); if (phase == null) { continue; } phase.Emcee = this; intros.Enqueue(phase); if (phase.name.Equals("Final")) { FinalPhase = phase; } } UI.Skip += (sender, e) => Skip(); }
IEnumerator PlaySubPhase() { while (subPhase.Count > 0) { IntroPhase phase = subPhase.Dequeue(); phase.Emcee = Emcee; yield return(StartCoroutine(phase.Process())); } }
protected override void Awake() { subPhase = new Queue <IntroPhase>(); base.Awake(); for (int i = 0; i < transform.childCount; ++i) { IntroPhase phase = FindComponent <IntroPhase>(transform.GetChild(i)); if (phase == null) { continue; } subPhase.Enqueue(phase); } }