27 lines
715 B
C#
27 lines
715 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class StoryController : MonoBehaviour
|
|
{
|
|
public StoryDisplay storyDisplay;
|
|
|
|
private SceneId nextSceneId;
|
|
|
|
void Start() {
|
|
// TODO: Read which scene should be loaded.
|
|
this.nextSceneId = SceneId.Prologue_First;
|
|
|
|
StartCoroutine(this.PlayScenes());
|
|
}
|
|
|
|
private IEnumerator PlayScenes() {
|
|
while (true) {
|
|
SceneId id = this.nextSceneId;
|
|
this.nextSceneId = SceneId.None;
|
|
StoryScene scene = StorySceneDatabase.Load(id);
|
|
yield return scene.Play(this.storyDisplay);
|
|
this.nextSceneId = scene.GetNextSceneId();
|
|
}
|
|
}
|
|
}
|