Exemple #1
0
 private void ReplaceNode(BehaviorTree.BehaviorNode node, Type behaviorType)
 {
     this.currentNodeSerializedObject = null;
     this.currentNodes = null;
     this.behaviorTree.ReplaceBehavior(node, behaviorType);
     this.Save();
 }
Exemple #2
0
        private void RemoveNodeOnly(BehaviorTree.BehaviorNode node)
        {
            this.currentNodeSerializedObject = null;
            this.currentNodes = null;

            this.behaviorTree.RemoveBehaviorExcludeChildren(node);
            this.Save();
        }
Exemple #3
0
        private void RemoveNode(BehaviorTree.BehaviorNode node)
        {
            this.currentNodeSerializedObject = null;
            this.currentNodes = null;

            this.behaviorTree.RemoveBehavior(node);
            this.Save();
        }
Exemple #4
0
        private void AddNode(StratusAIBehavior behavior, BehaviorTree.BehaviorNode parent = null)
        {
            if (parent != null)
            {
                this.behaviorTree.AddBehavior(behavior, parent);
            }
            else
            {
                this.behaviorTree.AddBehavior(behavior);
            }

            this.Save();
        }
Exemple #5
0
        //----------------------------------------------------------------------/
        // Methods: Private
        //----------------------------------------------------------------------/
        private void AddChildNode(Type type, BehaviorTree.BehaviorNode parent = null)
        {
            if (parent != null)
            {
                this.behaviorTree.AddBehavior(type, parent);
            }
            else
            {
                this.behaviorTree.AddBehavior(type);
            }

            this.Save();
        }
            private void AddNode(Behavior behavior, BehaviorTree.BehaviorNode parent = null)
            {
                if (parent != null)
                {
                    behaviorTree.AddBehavior(behavior, parent);
                }
                else
                {
                    behaviorTree.AddBehavior(behavior);
                }

                Save();
            }
Exemple #7
0
        private void OnSelectionChanged(IList <int> ids)
        {
            this.currentNodeSerializedObject = null;
            //this.currentNodeProperty = null;

            this.currentNodes = this.treeInspector.GetElements(ids);
            if (this.currentNodes.Count > 0)
            {
                this.currentNode = this.currentNodes[0];
                this.currentNodeSerializedObject = new StratusSerializedEditorObject(this.currentNode.data);
                //SerializedObject boo = new SerializedObject(currentNode.data);
                //this.currentNodeProperty = this.treeElementsProperty.GetArrayElementAtIndex(ids[0]);
            }
        }
Exemple #8
0
 private void AddParentNode(Type type, BehaviorTree.BehaviorNode child)
 {
     this.behaviorTree.AddParentBehavior(type, child);
     this.Save();
 }