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