behavior_tree library

Behavior tree implementation in dart

Classes

AsyncTask
This is a leaf node that will execute the given async task when ticked. While the callback is executing, this node will report status as NodeStatus.running. Once the callback finishes, the status will be updated to the returned value of the callback.
BaseNode
A base class for all the nodes.
Condition
This is a leaf node that will updates its status based on conditionCallback.
Inverter
A decorator node that inverts child's status if it is not NodeStatus.running.
Limiter
A decorator node that limits the number of times child can be ticked.
NodeInterface
An interface which all the nodes implement.
Selector
A composite node that stops at its first non-failing child node.
Sequence
A composite node that stops at its first successful child node.
Task
This is a leaf node that will execute the given task when ticked.

Enums

NodeStatus
The valid values for status of a node.

Typedefs

AsyncTaskCallback = Future<NodeStatus> Function()
ConditionCallback = bool Function()
TaskCallback = NodeStatus Function()
The type of callback used by the Task node.