示例#1
0
        private void BindHotfixDecorators(BehaviorTreeTasks tasks)
        {
            foreach (var hotfixDecorator in tasks.hotfixDecorators)
            {
                var component = BehaviorTreeComponentFactory.Create(GetParent <Entity>(), hotfixDecorator);

                if (component != null)
                {
                    behaviorTreeDecoratorComponents.Add(hotfixDecorator, component);
                }
            }
        }
示例#2
0
        private void BindHotfixConditionals(BehaviorTreeTasks tasks)
        {
            foreach (var hotfixConditional in tasks.hotfixConditionals)
            {
                var component = BehaviorTreeComponentFactory.Create(GetParent <Entity>(), hotfixConditional);

                if (component != null)
                {
                    behaviorTreeConditionalComponents.Add(hotfixConditional, component);
                }
            }
        }
示例#3
0
        private void BindHotfixActions(BehaviorTreeTasks tasks)
        {
            foreach (var hotfixAction in tasks.hotfixActions)
            {
                var component = BehaviorTreeComponentFactory.Create(GetParent <Entity>(), hotfixAction);

                if (component != null)
                {
                    behaviorTreeActionComponents.Add(hotfixAction, component);
                }
            }
        }
        private static void BindHotfixDecorators(BehaviorTreeComponent self, BehaviorTree behaviorTree)
        {
            var tasks = behaviorTree.Behavior.FindTasks <HotfixDecorator>();

            if (tasks == null)
            {
                return;
            }

            foreach (var hotfixDecorator in tasks)
            {
                var component = BehaviorTreeComponentFactory.Create(behaviorTree, hotfixDecorator);

                if (component != null)
                {
                    self.DecoratorComponents.Add(hotfixDecorator, component);
                }
            }
        }
        private static void BindHotfixConditionals(BehaviorTreeComponent self, BehaviorTree behaviorTree)
        {
            var tasks = behaviorTree.Behavior.FindTasks <HotfixConditional>();

            if (tasks == null)
            {
                return;
            }

            foreach (var hotfixConditional in tasks)
            {
                var component = BehaviorTreeComponentFactory.Create(behaviorTree, hotfixConditional);

                if (component != null)
                {
                    self.ConditionalComponents.Add(hotfixConditional, component);
                }
            }
        }
示例#6
0
        private static void BindHotfixComposites(BehaviorTree self)
        {
            var tasks = self.Behavior.FindTasks <HotfixComposite>();

            if (tasks == null)
            {
                return;
            }

            foreach (var hotfixComposite in tasks)
            {
                var component = BehaviorTreeComponentFactory.Create(self, hotfixComposite);

                if (component != null)
                {
                    self.CompositeComponents.Add(hotfixComposite, component);
                }
            }
        }