// TODO: ThinkLoop public void ThinkLoop() { if (controlStatus == Status.IDLE && deliberatorOn) { printMap(); string nextaction = deliberator.GetNextAction(); controlStatus = Status.EXECUTING; botActions.DoAction(nextaction); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Space)) { botActions.DoAction("grab"); } if (Input.GetKeyDown(KeyCode.LeftShift)) { botActions.DoAction("drop"); } }
// 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); } } }
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); }