void Awake() { Pathways.StateChange += new StateHandler(EventListener); term = new util::key((n) => { if (!wait && n && !term.input) { StartCoroutine(Term()); } term.input = n; }); // were in constructor Pathways.terminal = this; rect = GetComponent <RectTransform>(); inputField = GetComponentInChildren <ui::InputField>(); foreach (var elem in GetComponentsInChildren <ui::Text>()) { if (elem.name == "Prompt") { elem.text = prompt; } } log = GetComponentInChildren <ui::Text>(); logs = new Queue <string>(); Pathways.Log("init"); }
void Awake() { Pathways.StateChange += new StateHandler(EventListener); Pathways.messageWindow = this; foreach (var child in GetComponentsInChildren<ui::Text>()) if (child.name=="Title") message_title = child; else if (child.name=="Body") message_body = child; if (!message_title || !message_body) Debug.LogError("missing title / body"); }
void Awake() { Pathways.StateChange += new StateHandler(EventListener); Pathways.messageWindow = this; foreach (var child in GetComponentsInChildren <ui::Text>()) { if (child.name == "Title") { message_title = child; } else if (child.name == "Body") { message_body = child; } } if (!message_title || !message_body) { Debug.LogError("missing title / body"); } }