Constructor
new BehaviorTreeNodeSelector($nodes)
- Description:
- Creates a new behavior tree selector node.
- Source:
Example
const first = new BehaviorTreeNodeAction(handler);
const second = new BehaviorTreeNodeAction(handler);
const selection = new BehaviorTreeNodeSelector(node);
const tree = new BehaviorTree(selection);
const success = tree.tick(timetick);
Parameters:
| Name | Type | Description |
|---|---|---|
$nodes |
Array.<BehaviorTreeNode> | The nodes. |
Methods
tick($timetick) → {boolean}
- Description:
- Updates the behavior tree by one tick update.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
$timetick |
number | The tick duration (in ms). |
Returns:
- Type
- boolean