void Update() { if (Input.GetButtonDown("Fire2")) { Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit); BehaviorEvent.Run(new Sequence(Node_GoTo(position)), this); } }
void Update() { if (Input.GetKeyDown(KeyCode.R) == true) { BehaviorEvent.Run( this.ConversationTree(), Wanderer, Friend); } }
void Update() { if (Input.GetButtonDown("Fire1")) { RaycastHit hit; Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit); if (hit.transform.parent != null && hit.transform.parent.gameObject.name == "Food Stand") { BehaviorEvent.Run(this.Eat(hit.transform.parent), player); } else if (hit.transform.gameObject.name == "Soil") { Debug.Log(player.Agent.AgentStatus); //if() BehaviorEvent.Run(this.Dig(hit.transform), player); } } }