Esempio n. 1
0
        void UpdateBehaviorTree()
        {
            if (rootNode == null)
            {
                rootNode = GetRootNode <BehaviorTreeNode>();
            }

            if (navigator == null)
            {
                if (string.IsNullOrEmpty(navigatorPath))
                {
                    navigator = GetRootNode <INavAgent>();
                }
                else
                {
                    navigator = GetNode(navigatorPath) as INavAgent;
                }
            }

            if (rootNode != null)
            {
                rootNode.AssignChildNodes();
                AssignBehaviorTreeOnChildren(rootNode);
            }
            else
            {
                GD.Print("The Behavior Tree '" + GetName() + "' needs a root BehaviorTreeNode!");
            }
        }
Esempio n. 2
0
 public NavGroup(INavAgent controlledTarget) : base(controlledTarget)
 {
 }
Esempio n. 3
0
 public NavIndividual(INavAgent controlledTarget) : base(controlledTarget)
 {
 }
Esempio n. 4
0
 public NavEntity(INavAgent controlledTarget)
 {
     entityID             = System.Guid.NewGuid();
     _entityDic[entityID] = this;
     controlledAgent      = controlledTarget;
 }