API Documentation for: 0.1.0
Show:

Tick Class

Defined in: Tick:35
Module: Behavior3JS

A new Tick object is instantiated every tick by BehaviorTree. It is passed as parameter to the nodes through the tree during the traversal.

The role of the Tick class is to store the instances of tree, debug, target and blackboard. So, all nodes can access these informations.

For internal uses, the Tick also is useful to store the open node after the tick signal, in order to let BehaviorTree to keep track and close them when necessary.

This class also makes a bridge between nodes and the debug, passing the node state to the debug if the last is provided.

Methods

_closeNode

(
  • node
)
protected

Defined in _closeNode:160

Callback when closing a node (called by BaseNode).

Parameters:

  • node Object

    The node that called this method.

_enterNode

(
  • node
)
protected

Defined in _enterNode:124

Called when entering a node (called by BaseNode).

Parameters:

  • node Object

    The node that called this method.

_exitNode

(
  • node
)
protected

Defined in _exitNode:172

Callback when exiting a node (called by BaseNode).

Parameters:

  • node Object

    The node that called this method.

_openNode

(
  • node
)
protected

Defined in _openNode:138

Callback when opening a node (called by BaseNode).

Parameters:

  • node Object

    The node that called this method.

_tickNode

(
  • node
)
protected

Defined in _tickNode:149

Callback when ticking a node (called by BaseNode).

Parameters:

  • node Object

    The node that called this method.

initialize

()

Defined in initialize:106

Initialization method.

Properties

_nodeCount

Integer protected

Defined in _nodeCount:96

The number of nodes entered during the tick. Update during the tree traversal.

_openNodes

Array protected

Defined in _openNodes:87

The list of open nodes. Update during the tree traversal.

blackboard

Blackboard

Defined in blackboard:79

The blackboard reference.

debug

Object

Defined in debug:63

The debug reference.

target

Object

Defined in target:71

The target object reference.

tree

b3.BehaviorTree

Defined in tree:55

The tree reference.