RAIN.BehaviorTrees.BTActionNode Class Reference

BTActionNode is the behavior leaf node representing an atomic action. More...

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

List of all members.

Public Member Functions

 BTActionNode (string nodeName)
 Constructor.
void SetAction (string actionName)
 SetAction loads an instance from the supplied class name.
override ActionResult Start (Agent agent, float deltaTime)
 Start initializes context and the action instance.
override ActionResult Execute (Agent agent, float deltaTime)
 Execute causes the action instance to execute.
override ActionResult Stop (Agent agent, float deltaTime)
 Stop sends the Stop message to the action instance.

Public Attributes

const string NODETYPE = "action"
 Node type, used in xml parsing.
Action.Action actionInstance
 An instance of the Action to execute.

Detailed Description

BTActionNode is the behavior leaf node representing an atomic action.


Constructor & Destructor Documentation

RAIN.BehaviorTrees.BTActionNode.BTActionNode ( string  nodeName)

Constructor.

Parameters:
nodeNameThe name of the node to create

Member Function Documentation

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

Execute causes the action instance to execute.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
ActionResult, FAILURE if the instance is null

Reimplemented from RAIN.Action.Action.

void RAIN.BehaviorTrees.BTActionNode.SetAction ( string  actionName)

SetAction loads an instance from the supplied class name.

Parameters:
actionNameThe class name of the action to load
override ActionResult RAIN.BehaviorTrees.BTActionNode.Start ( Agent  agent,
float  deltaTime 
) [virtual]

Start initializes context and the action instance.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
ActionResult, FAILURE if the instance is null

Reimplemented from RAIN.Action.Action.

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

Stop sends the Stop message to the action instance.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
ActionResult, FAILURE if the instance is null

Reimplemented from RAIN.Action.Action.


Member Data Documentation

Node type, used in xml parsing.