public void Play(SequenceChapterData data) { foreach (var element in data.elements) { coroutines.Add(StartCoroutine(Show(element))); } coroutines.Add(StartCoroutine(Complete(data))); }
private IEnumerator Complete(SequenceChapterData data) { yield return(new WaitForSeconds(data.duration)); StoryManager.instance.OpenChapter(data.nextChapter); }