Public Member Functions | Public Attributes | Properties
RAIN.BehaviorTrees.BTIteratorNode Class Reference

BehaviorTree iterator node. Iteration is initialized based on a count initializer expression, which may contain variables. More...

Inheritance diagram for RAIN.BehaviorTrees.BTIteratorNode:
RAIN.BehaviorTrees.BTNode RAIN.Action.Action

List of all members.

Public Member Functions

 BTIteratorNode (string nodeName)
 Constructor.
override void GetActiveNodes (List< BTNode > nodeList)
void SetCountInitializer (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.

Properties

override bool IsContainer [get]

Detailed Description

BehaviorTree iterator node. Iteration is initialized based on a count initializer expression, which may contain variables.


Constructor & Destructor Documentation

Constructor.

Parameters:
nodeNameThe name of the node to create

Member Function Documentation

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.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
ActionResult

Reimplemented from RAIN.Action.Action.

Set the iterator expression using parseable text. The expression is only evaluated during Start().

Parameters:
expressionThe text expression to parse. See Representation.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.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
ActionResult

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.BehaviorTrees.BTIteratorNode.Stop ( Agent  agent,
float  deltaTime 
) [virtual]

Stop Action handler.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
ActionResult

Reimplemented from RAIN.Action.Action.


Member Data Documentation

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.