Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
 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");
 }
Exemplo n.º 3
0
 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");
     }
 }