public BehaviourTreeNodeRandomBuilder(IBehaviourTreeNodeRandom <TTick, TState> parentNode) { if (parentNode == null) { throw new ArgumentNullException(nameof(parentNode)); } _parentNode = parentNode; }
public void Root(IBehaviourTreeNodeRandom <TTickData, TState> root, Action <BehaviourTreeNodeRandomBuilder <TTickData, TState> > config) { var rootBuilder = new BehaviourTreeNodeRandomBuilder <TTickData, TState>(root); config(rootBuilder); SetRootInternal(root); }
public void Decorate( IBehaviourTreeNodeRandom <TTick, TState> node, Action <BehaviourTreeNodeRandomBuilder <TTick, TState> > config) { if (node == null) { throw new ArgumentNullException(nameof(node)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } _parentNode.Decorate(node); config(new BehaviourTreeNodeRandomBuilder <TTick, TState>(node)); }
public BehaviourTreeNodeSequenceBuilder <TTickData, TState> Add( IBehaviourTreeNodeRandom <TTickData, TState> node, Action <BehaviourTreeNodeRandomBuilder <TTickData, TState> > config) { if (node == null) { throw new ArgumentNullException(nameof(node)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } _parentNode.AddNode(node); config(new BehaviourTreeNodeRandomBuilder <TTickData, TState>(node)); return(this); }
public BehaviourTreeNodeRandomBuilder <TTick, TState> Add( uint probability, IBehaviourTreeNodeRandom <TTick, TState> node, Action <BehaviourTreeNodeRandomBuilder <TTick, TState> > config) { if (node == null) { throw new ArgumentNullException(nameof(node)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } _parentNode.AddNode(node, probability); config(new BehaviourTreeNodeRandomBuilder <TTick, TState>(node)); return(this); }