Example #1
0
 // TODO: ThinkLoop
 public void ThinkLoop()
 {
     if (controlStatus == Status.IDLE && deliberatorOn)
     {
         printMap();
         string nextaction = deliberator.GetNextAction();
         controlStatus = Status.EXECUTING;
         botActions.DoAction(nextaction);
     }
 }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         botActions.DoAction("grab");
     }
     if (Input.GetKeyDown(KeyCode.LeftShift))
     {
         botActions.DoAction("drop");
     }
 }
Example #3
0
 // TODO: ThinkLoop
 public void ThinkLoop()
 {
     if (controlStatus == Status.IDLE)
     {
         string nextaction = deliberator.GetNextAction();
         Debug.Log("NEXT ACTION: " + nextaction);
         if (nextaction != "")
         {
             controlStatus = Status.EXECUTING;
             botActions.DoAction(nextaction);
         }
     }
 }
Example #4
0
    void OnMouseDown()
    {
        bot = GameObject.Find(botName);
        float      x          = transform.position.x;
        float      z          = transform.position.z;
        BotActions botActions = bot.GetComponent <BotActions>();
        string     command    = action + " " + x + " " + z;

        botActions.DoAction(command);
    }