Public Member Functions | Public Attributes
RAIN.Primitives.AnimateAction Class Reference

AnimateAction is a primitive that can be used to manipulate animation in RAIN characters. The easiest way to link animation to your character is by adding an AnimationRequestHandler to it - either directly or through a controller that supports IAnimationRequestHandler (e.g., an AIAnimationController). More...

Inheritance diagram for RAIN.Primitives.AnimateAction:
RAIN.Action.Action

List of all members.

Public Member Functions

override ActionResult Start (Agent agent, float deltaTime)
 ActionResult.Start.
override ActionResult Execute (Agent agent, float deltaTime)
 ActionResult.Execute Causes the HandleAIAnimationStateTransition method of the agent.Avatar to be activated (via BroadcastMessage)
override ActionResult Stop (Agent agent, float deltaTime)
 ActionResult.Stop NOTE - Does NOT explicitly stop your animation. If your animation is looping, you will need to turn it off by setting a different animation state or stopping it manually.

Public Attributes

string animation
 the animation associated with this action
int layer
 the layer the animation should play on
WrapMode wrapMode
 wrap mode for animation looping
float fadeIn
 time in seconds to fade in the animation
float fadeOut
 time in seconds to fade out the animation
float waitforsec
 the number of seconds to wait after triggering the animation before moving on. This is typically the length of the animation itself. If set to zero, then the node will continue running indefinitely

Detailed Description

AnimateAction is a primitive that can be used to manipulate animation in RAIN characters. The easiest way to link animation to your character is by adding an AnimationRequestHandler to it - either directly or through a controller that supports IAnimationRequestHandler (e.g., an AIAnimationController).


Member Function Documentation

override ActionResult RAIN.Primitives.AnimateAction.Execute ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Execute Causes the HandleAIAnimationStateTransition method of the agent.Avatar to be activated (via BroadcastMessage)

Parameters:
agent
deltaTime
Returns:
RUNNING if the waitforsec timeout has not expired, SUCCESS otherwise

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.Primitives.AnimateAction.Start ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Start.

Parameters:
agent
deltaTime
Returns:
FAILURE if no animation has been set, SUCCESS otherwise

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.Primitives.AnimateAction.Stop ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Stop NOTE - Does NOT explicitly stop your animation. If your animation is looping, you will need to turn it off by setting a different animation state or stopping it manually.

Parameters:
agent
deltaTime
Returns:

Reimplemented from RAIN.Action.Action.


Member Data Documentation

the animation associated with this action

time in seconds to fade in the animation

time in seconds to fade out the animation

the layer the animation should play on

the number of seconds to wait after triggering the animation before moving on. This is typically the length of the animation itself. If set to zero, then the node will continue running indefinitely

wrap mode for animation looping