Beispiel #1
0
 /// <summary>
 /// Add child node at the end of children
 /// </summary>
 public void AddChild(Node child)
 {
     child.Parent = this;
     m_childList.Add(child);
 }
Beispiel #2
0
 /// <summary>
 /// Create a wrapper to de something else after running a child.
 /// </summary>
 /// <param name="wrapper">Wrapping method</param>
 public WrapperNode CreateWrapperDecorator(string name, Node child, WrapperNode.DelWrapper wrapper, Blackboard bb)
 {
     CheckName(name);
     WrapperNode node= new WrapperNode(name, child, wrapper);
     if (bb != null)
     {
         node.privateBlackboard = bb;
     }
     return node;
 }
Beispiel #3
0
 /// <summary>
 /// Create a loop node to repeat running its child times
 /// </summary>
 public LoopNode CreateLoopDecorator(string name, Node child, byte loopTimes, Blackboard bb)
 {
     CheckName(name);
     LoopNode node = new LoopNode(name, child, loopTimes);
     if (bb != null)
     {
         node.privateBlackboard = bb;
     }
     return node;
 }
Beispiel #4
0
 /// <summary>
 /// Create a negator to negate the child's executing result
 /// </summary>
 public NegateNode CreateNegateDecorator(string name, Node child, Blackboard bb)
 {
     CheckName(name);
     NegateNode node = new NegateNode(name, child);
     if (bb != null)
     {
         node.privateBlackboard = bb;
     }
     return node;
 }
Beispiel #5
0
 public InfiniteLoopNode CreateInfiniteDecorator(string name, Node child, Blackboard bb)
 {
     CheckName(name);
     InfiniteLoopNode node =  new InfiniteLoopNode(name, child);
     if (bb != null)
     {
         node.privateBlackboard = bb;
     }
     return node;
 }