Build the actual tree.
Root node of this tree.
Like an action node, but the function can return true/false and is mapped to success/failure.
name of this node.
Things need to be executed.
Builder itself.
Create an action node.
name of action node.
Things need to be executed.
Builder itself.
Ends a sequence of children.
Builder itself.
Create an inverter node that inverts the success/failure of its children.
name of this node.
Builder itself.
Create a parallel node.
name of this node.
If number of failures reaches this, then this node will return [[behaviorTreeStatus.Failure]]
If number of success reaches this, then this node will return [[behaviorTreeStatus.Success]]
Builder itself.
Create a selector node.
name of this node.
Builder itself.
Create a sequence node.
Builder itself.
Splice a sub tree into the parent tree.
sub tree that need to be added.
Builder itself.
Generated using TypeDoc
The builder of behavior tree
Use End to complete build.
Use Build to get an instance of root node.
Basic usage example:
import {behaviorTreeBuilder} from 'ts-behavior-tree'; let root = new behaviorTreeBuilder() .Do('something', t => { console.log(`Time updated: ${t}`); } ).end().build();