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

BTRandomNode executes a single node from a set of nodes, choosing the node to execute at random. More...

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

List of all members.

Public Member Functions

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

Public Attributes

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

Properties

override bool IsContainer [get]

Detailed Description

BTRandomNode executes a single node from a set of nodes, choosing the node to execute at random.


Constructor & Destructor Documentation

Constructor.

Parameters:
nodeNameThe name of the node to create

Member Function Documentation

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

Execute causes child nodes to be executed in turn. If any child returns FAILURE, this node returns FAILURE and stops executing.

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

Reimplemented from RAIN.Action.Action.

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

Node type, used in xml parsing.