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

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

            this.behaviorTree.RemoveBehavior(node);
            this.Save();
        }
Example #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();
        }
Example #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();
            }
Example #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]);
            }
        }
Example #8
0
 private void AddParentNode(Type type, BehaviorTree.BehaviorNode child)
 {
     this.behaviorTree.AddParentBehavior(type, child);
     this.Save();
 }