public override void AddChild(BehaviorComponent behaviorComponent) { if (_behaviors == null) { _behaviors = new BehaviorComponent[] { } } ; _behaviors = _behaviors.Append(behaviorComponent).ToArray(); }
/// <summary> /// Splice a sub tree into the parent tree. /// </summary> public BehaviourTreeBuilder Splice(BehaviorComponent subTree) { if (subTree == null) { throw new ArgumentNullException("subTree"); } if (parentNodeStack.Count <= 0) { throw new ApplicationException("Can't splice an unnested sub-tree, there must be a parent-tree."); } parentNodeStack.Peek().AddChild(subTree); return(this); }
public override void AddChild(BehaviorComponent behaviorComponent) { throw new NotImplementedException(); }
public override void AddChild(BehaviorComponent behaviorComponent) { _Behavior = behaviorComponent; }
/// <summary> /// Ends a sequence of children. /// </summary> public BehaviourTreeBuilder End() { curNode = parentNodeStack.Pop(); return(this); }
public void AddBehaviour(BehaviorComponent behaviorComponent) { _Behaviors = _Behaviors.Append(behaviorComponent).ToArray(); }