iBTNode Struct Reference
This is a node of a behaviour tree. More...
Public Member Functions
|virtual bool||AddChild (iBTNode *child)=0|
|Add a child node to this node. |
|virtual BTStatus||Execute (iCelParameterBlock *params, csRefArray< iBTNode > *BTStack=0)=0|
|Execute this node. |
|virtual BTStatus||GetStatus ()=0|
|Get the status of this node. |
|virtual void||SetName (csString nodeName)=0|
|Set the name of this node for error reporting. |
|virtual void||SetStatus (BTStatus newStatus)=0|
|Set the status of this node. |
This is a node of a behaviour tree.
A behaviour tree allows to define the behaviour of an entity by combining behaviour nodes into a tree.
There are different type of nodes. The main leaf nodes of the tree are iBTAction nodes that fire actions (eg by sending a message to an entity or a property class). Non-action nodes are used to select the actions that will be executed.
Here is the list of different non-action nodes:
- "cel.behaviourtree": Default behaviour for a root node. It executes the tree regularly.
- "cel.selectors.default": The default selector. It executes its children in order until one succeeds.
- "cel.selectors.random": A random selector. It executes its children in a random order until one succeeds.
- "cel.selectors.sequential": A sequential selector. It executes its children in order until one fails or all have succeeded. Often refered in behaviour tree literature as a sequence.
- iTriggerFiredCondition: A wrapper to use triggers within behaviour trees. Return false until the trigger has been fired.
- iParameterCheckCondition: A wrapper to use parameters within behaviour trees. Return whether or not the parameter is equal to the given value.
- iExecutionLimitDecorator: A decorator limiting the number of times a child is executed.
- iLoopDecorator: A loop decorator. It executes its child multiple times in a row.
- "cel.decorators.negatereturn": A negation decorator. It executes its child and returns the opposite of the result.
Member Function Documentation
|virtual bool iBTNode::AddChild||(||iBTNode *||child||)||
Add a child node to this node.
|virtual BTStatus iBTNode::Execute||(||iCelParameterBlock *||params,|
|csRefArray< iBTNode > *|| BTStack = |
Execute this node.
Return whether or not the execution of the node was successful.
|virtual BTStatus iBTNode::GetStatus||(||)||
Get the status of this node.
|virtual void iBTNode::SetName||(||csString||nodeName||)||
Set the name of this node for error reporting.
|virtual void iBTNode::SetStatus||(||BTStatus||newStatus||)||
Set the status of this node.
The documentation for this struct was generated from the following file:
Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1