BehaviorTree iterator node. Iteration is initialized based on a count initializer expression, which may contain variables. More...
Public Member Functions | |
BTIteratorNode (string nodeName) | |
Constructor. | |
void | SetExpression (string expression) |
Set the iterator expression using parseable text. The expression is only evaluated during Start(). | |
override Action.Action.ActionResult | Start (Agent agent, float deltaTime) |
Start Action handler. The iteration count is set here by evaluating the countInitializer expression. | |
override ActionResult | Execute (Agent agent, float deltaTime) |
Execute processes similar to a standard BTSequencerNode but will repeat the sequence up to the number of iterations specified by the countInitializer expression. | |
override ActionResult | Stop (Agent agent, float deltaTime) |
Stop Action handler. | |
Public Attributes | |
const string | NODETYPE = "iterator" |
Node type, used in xml parsing. | |
Expression | countInitializer |
The Expression used to initialize the loop count. This can be any Expression, but the float result will be cast to an int. |
BehaviorTree iterator node. Iteration is initialized based on a count initializer expression, which may contain variables.
RAIN.BehaviorTrees.BTIteratorNode.BTIteratorNode | ( | string | nodeName | ) |
Constructor.
nodeName | The name of the node to create |
override ActionResult RAIN.BehaviorTrees.BTIteratorNode.Execute | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Execute processes similar to a standard BTSequencerNode but will repeat the sequence up to the number of iterations specified by the countInitializer expression.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
void RAIN.BehaviorTrees.BTIteratorNode.SetExpression | ( | string | expression | ) |
Set the iterator expression using parseable text. The expression is only evaluated during Start().
expression | The text expression to parse. See Belief.ExpressionParser. |
override Action.Action.ActionResult RAIN.BehaviorTrees.BTIteratorNode.Start | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Start Action handler. The iteration count is set here by evaluating the countInitializer expression.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
override ActionResult RAIN.BehaviorTrees.BTIteratorNode.Stop | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Stop Action handler.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
The Expression used to initialize the loop count. This can be any Expression, but the float result will be cast to an int.
const string RAIN.BehaviorTrees.BTIteratorNode.NODETYPE = "iterator" |
Node type, used in xml parsing.