// Use this for initialization void Start() { TreeBrains = GetComponent <UAI_Agent> (); TreeBrains.SetVoidActionDelegate("Heal", Heal); TreeBrains.SetVoidActionDelegate("InfluencePlants", InfluencePlants); TreeBrains.SetVoidActionDelegate("SpawnCritters", SpawnCritters); LandScript = GameObject.Find("Terrain_0_0-20181102-101609").GetComponent <Land> (); }
void Start() { _UAIagent = GetComponent <UAI_Agent> (); _navAgent = GetComponent <NavMeshAgent> (); _UAIagent.SetVoidActionDelegate("Eating", Eating); _UAIagent.SetVoidActionDelegate("Urinate", Urinate); _UAIagent.SetVoidActionDelegate("Playing", Playing); }
void Start() { agent = GetComponent <UAI_Agent> (); preDestination = transform.position; //add function delegate to action agent.SetVoidActionDelegate("Sleep", Sleep); agent.SetVoidActionDelegate("Shower", Shower); agent.SetVoidActionDelegate("Eat at Restaurant", EatAtRestaurant); agent.SetVoidActionDelegate("Eat at Home", EatAtHome); agent.SetVoidActionDelegate("Watch Movie", WatchMovie); agent.SetVoidActionDelegate("Get Groceries", GetGroceries); agent.SetVoidActionDelegate("Drink Coffee", DrinkCoffee); agent.SetVoidActionDelegate("Work", Work); agent.SetVoidActionDelegate("Work at Home", WorkAtHome); }