BehaviorTreeNodeSequencer

BehaviorTreeNodeSequencer

Creates behavior tree sequencer nodes.

Constructor

new BehaviorTreeNodeSequencer($nodes)

Description:
  • Creates a new behavior tree sequencer node.
Source:
Example
const first = new BehaviorTreeNodeAction(handler);
const second = new BehaviorTreeNodeAction(handler);

const sequence = new BehaviorTreeNodeSequencer(node);

const tree = new BehaviorTree(sequence);

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