public void InjectBlackboards(BehaviourTree tree, BTAgent agent) { object[] blackboards = new object[1]; foreach (var prop in m_taskBindings[tree]) { blackboards[0] = agent.GetBlackboard(prop.PropertyType); prop.SetMethod.Invoke(prop.Task, blackboards); } }
public void StopBehaviourTree(BTAgent agent) { m_treeScheduler.Stop(agent); }
public void RunBehaviourTree(BehaviourTree tree, BTAgent agent) { m_treeScheduler.Start(tree, agent); }
public void Start(BTAgent agent) { m_scheduler.ScheduleFirst(m_root, null); }
public void SwitchContext(BTAgent agent) { m_blackboardManager.InjectBlackboards(this, agent); m_scheduler = agent.Scheduler; }