Example #1
0
        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);
            }
        }
Example #2
0
 public void StopBehaviourTree(BTAgent agent)
 {
     m_treeScheduler.Stop(agent);
 }
Example #3
0
 public void RunBehaviourTree(BehaviourTree tree, BTAgent agent)
 {
     m_treeScheduler.Start(tree, agent);
 }
Example #4
0
 public void Start(BTAgent agent)
 {
     m_scheduler.ScheduleFirst(m_root, null);
 }
Example #5
0
 public void SwitchContext(BTAgent agent)
 {
     m_blackboardManager.InjectBlackboards(this, agent);
     m_scheduler = agent.Scheduler;
 }