Public Member Functions | Protected Attributes
RAIN.BehaviorTrees.BTDecoratorNode Class Reference

DecoratorNode is the abstract base class for behavior tree nodes that are intended as passthrough decorators that proxy for their child but add some intermediate functionality. More...

Inheritance diagram for RAIN.BehaviorTrees.BTDecoratorNode:
RAIN.BehaviorTrees.BTNode RAIN.Action.Action RAIN.BehaviorTrees.BTLastStateNode RAIN.BehaviorTrees.BTRepeater

List of all members.

Public Member Functions

 BTDecoratorNode (BTNode child)
 Standard constructor. The actionName of the decorator becomes that name of the child.
void SetDecoratedChild (BTNode child)
 Directly set the child node being decorated.
override void AddChild (BTNode child)
 AddChild passthrough. The child is added to the decorated object.
override void RemoveChild (string actionName)
 RemoveChild passthrough. The child is removed from the decorated object.
override float Priority ()
 Priority passthroough.
override void SetActionContext (Action.ActionContext context)
 SetActionContext passthrough. Sets the actionContext of this and the decorated node.
override void Sort ()
 Sort passthrough.
override ActionResult Start (Core.Agent agent, float deltaTime)
 Action.Start passthrough.
override ActionResult Execute (Core.Agent agent, float deltaTime)
 Action.Execute passthrough.
override ActionResult Stop (Core.Agent agent, float deltaTime)
 Action.Stop passthrough.

Protected Attributes

BTNode childNode = null
 The childNode being decorated.

Detailed Description

DecoratorNode is the abstract base class for behavior tree nodes that are intended as passthrough decorators that proxy for their child but add some intermediate functionality.


Constructor & Destructor Documentation

Standard constructor. The actionName of the decorator becomes that name of the child.

Parameters:
childThe child being decorated

Member Function Documentation

override void RAIN.BehaviorTrees.BTDecoratorNode.AddChild ( BTNode  child) [virtual]

AddChild passthrough. The child is added to the decorated object.

Parameters:
childNew child node

Reimplemented from RAIN.BehaviorTrees.BTNode.

override ActionResult RAIN.BehaviorTrees.BTDecoratorNode.Execute ( Core.Agent  agent,
float  deltaTime 
)

Action.Execute passthrough.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
Returns the ActionResult of the decorated node
override float RAIN.BehaviorTrees.BTDecoratorNode.Priority ( ) [virtual]

Priority passthroough.

Returns:
Returns the priority of the decorated node.

Reimplemented from RAIN.BehaviorTrees.BTNode.

override void RAIN.BehaviorTrees.BTDecoratorNode.RemoveChild ( string  actionName) [virtual]

RemoveChild passthrough. The child is removed from the decorated object.

Parameters:
actionNameactionName of the child to remove

Reimplemented from RAIN.BehaviorTrees.BTNode.

SetActionContext passthrough. Sets the actionContext of this and the decorated node.

Parameters:
contextActionContext to set

Directly set the child node being decorated.

Parameters:
childThe child to decorate
override void RAIN.BehaviorTrees.BTDecoratorNode.Sort ( ) [virtual]

Sort passthrough.

Reimplemented from RAIN.BehaviorTrees.BTNode.

override ActionResult RAIN.BehaviorTrees.BTDecoratorNode.Start ( Core.Agent  agent,
float  deltaTime 
)

Action.Start passthrough.

Parameters:
agentAI Agent owner of the behavior tree
deltaTimetimestep in seconds
Returns:
Returns the ActionResult of the decorated node
override ActionResult RAIN.BehaviorTrees.BTDecoratorNode.Stop ( Core.Agent  agent,
float  deltaTime 
)

Action.Stop passthrough.

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

Member Data Documentation

The childNode being decorated.