/// <summary> /// Create a Repeat until fail node. /// </summary> public BehaviourTreeBuilder RepeatUntilFail(string name) { var repeatUntilFailNode = new RepeatUntilFailNode(name); if (parentNodeStack.Count > 0) { parentNodeStack.Peek().AddChild(repeatUntilFailNode); } parentNodeStack.Push(repeatUntilFailNode); return(this); }
/// <summary> /// Create a Repeat until fail node. /// </summary> public BehaviourTreeBuilder <T> RepeatUntilFail(string name) { var repeatUntilFailNode = new RepeatUntilFailNode <T>(name, ++_idCounter); if (_parentNodeStack.Count > 0) { _parentNodeStack.Peek().AddChild(repeatUntilFailNode); } _parentNodeStack.Push(repeatUntilFailNode); return(this); }