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

BTSelectorNode chooses one of a set of options. The child list order is assumed to be prioritized, so that children can be evaluated in order. More...

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

List of all members.

Public Member Functions

 BTSelectorNode (string nodeName)
 Constructor.
override void GetActiveNodes (List< BTNode > nodeList)
override ActionResult Start (Agent agent, float deltaTime)
 Start Action handler.
override Action.Action.ActionResult Execute (Agent agent, float deltaTime)
 Execute causes child nodes to be evaluated in turn. If any child returns SUCCESS, this node returns SUCCESS and stops evaluating.
override Action.Action.ActionResult Stop (Agent agent, float deltaTime)
 Stop Action handler.

Public Attributes

const string NODETYPE = "selector"
 Node type, used in xml parsing.

Properties

override bool IsContainer [get]

Detailed Description

BTSelectorNode chooses one of a set of options. The child list order is assumed to be prioritized, so that children can be evaluated in order.


Constructor & Destructor Documentation

Constructor.

Parameters:
nodeNameThe name of the node to create

Member Function Documentation

override Action.Action.ActionResult RAIN.BehaviorTrees.BTSelectorNode.Execute ( Agent  agent,
float  deltaTime 
) [virtual]

Execute causes child nodes to be evaluated in turn. If any child returns SUCCESS, this node returns SUCCESS and stops evaluating.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
ActionResult, SUCCESS if any child is successful, FAILURE if all fail

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.BehaviorTrees.BTSelectorNode.Start ( Agent  agent,
float  deltaTime 
) [virtual]

Start Action handler.

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

Reimplemented from RAIN.Action.Action.

override Action.Action.ActionResult RAIN.BehaviorTrees.BTSelectorNode.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

const string RAIN.BehaviorTrees.BTSelectorNode.NODETYPE = "selector"

Node type, used in xml parsing.