using UnityEngine; using System; using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; namespace Fungus { /** * A rectangular screen area for rendering story text. * Rooms may contain any number of Pages. * If a Page is a child of a View, then transitioning to that View will automatically activate the Page. */ [ExecuteInEditMode] public class Page : MonoBehaviour { /// Rectangular bounds used to display page text public Bounds pageBounds = new Bounds(Vector3.zero, new Vector3(0.25f, 0.25f, 0f)); /// Page position within bounds when display height is less than bounds height public enum VerticalAlign { Top, Middle, Bottom } public VerticalAlign verticalAlign = VerticalAlign.Middle; string headerText = ""; string footerText = ""; string displayedStoryText = ""; string originalStoryText = ""; Action deferredAction; Action continueAction; public enum Mode { Idle, Say, Choose }; [HideInInspector] public Mode mode = Mode.Idle; class Option { public string optionText; public Action optionAction; public Option(string _optionText, Action _optionAction) { optionText = _optionText; optionAction = _optionAction; } } List