Exemplo n.º 1
0
 public virtual void Update()      // called on Unity thread
 {
     if (form != null && formLoaded)
     {
         if (!Console && form.Visible)
         {
             form.Hide();
         }
         if (Console && !form.Visible)
         {
             form.Show();
         }
     }
     if (sensing)
     {
         Sensing();
         sensing = false;
         sensingHandle.Set();
     }
     if (task != null)
     {
         if (Tracing)
         {
             Debug.Log("EXECUTING " + task);
         }
         execute(task);
         if (task is Utterance && task.isSystem())
         {
             Say(translate(task));
         }
         task = null;
         taskHandle.Set();
     }
     if (newMenu)
     {
         UpdateMenu(menu);
         menu    = null;
         newMenu = false;
         menuHandle.Set();
     }
 }