BehaviorTreeBuilder <T> endDecorator() { _currentNode = _parentNodeStack.Pop(); return(this); }
/// <summary> /// adds a child to this Composite /// </summary> /// <param name="child">Child.</param> public void addChild(Behavior <T> child) { _children.Add(child); }
public BehaviorTreeBuilder <T> endComposite() { Assert.isTrue(_parentNodeStack.Peek() is Composite <T>, "attempting to end a composite but the top node is a decorator"); _currentNode = _parentNodeStack.Pop(); return(this); }