Ejemplo n.º 1
0
    void LateUpdate()
    {
        if (Automator.Enabled())
        {
            if (!controller.Paralyzed)
            {
                string action = Automator.Step();
                controller.PerformAction(action);
            }
            return;
        }

        if (!created)
        {
            if (!client.Calling)
            {
                client.Create(GenerateMessage());
                created = true;
            }
        }
        else
        {
            if (client.HasAction)
            {
                lastAction = client.GetAction();
                controller.PerformAction(lastAction);
            }
            if (!client.Calling)
            {
                client.Step(GenerateMessage());
            }
        }
    }
Ejemplo n.º 2
0
 void LateUpdate()
 {
     if (!created)
     {
         if (!client.Calling)
         {
             client.Create(GenerateMessage());
             created = true;
         }
     }
     else
     {
         if (client.HasAction)
         {
             lastAction = client.GetAction();
             controller.PerformAction(lastAction);
         }
         if (!client.Calling)
         {
             client.Step(GenerateMessage());
         }
     }
 }