Skip to content

Commit

Permalink
Add abort type to behaviour tree builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ormesam committed Nov 16, 2021
1 parent f3b851f commit aa50710
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ public BehaviourTreeBuilder(BehaviourTree tree) {
stack = new Stack<Node>();
}

public BehaviourTreeBuilder Sequence(bool resetIfInterrupted) {
AddNode(new Sequencer(tree, resetIfInterrupted));
public BehaviourTreeBuilder Sequence(bool resetIfInterrupted = false, AbortType abortType = AbortType.None, Func<bool> abortCondition = null) {
AddNode(new Sequencer(tree, resetIfInterrupted, abortType, abortCondition));

return this;
}

public BehaviourTreeBuilder Selector() {
AddNode(new Selector(tree));
public BehaviourTreeBuilder Selector(AbortType abortType = AbortType.None, Func<bool> abortCondition = null) {
AddNode(new Selector(tree, abortType, abortCondition));

return this;
}
Expand Down

0 comments on commit aa50710

Please sign in to comment.