UVAnimation_Multi Class Reference

List of all members.

Public Member Functions

UVAnimation_Auto GetCurrentClip ()
 Gets a reference to the currently-playing clip.
UVAnimation_Auto[] BuildUVAnim (SpriteRoot s)
 Builds the UV animations for all animation clips that are a part of this animation sequence.
SPRITE_FRAME GetCurrentFrame ()
 Returns the SPRITE_FRAME of the current frame without advancing to the next frame.
void AppendAnim (int index, SPRITE_FRAME[] anim)
 Appends UV animation to the clip specified by index.
void AppendClip (UVAnimation clip)
 Appends UV animation clip to the end of the animation sequence.
void SetAnim (int index, SPRITE_FRAME[] frames)
 Replaces the contents of the specified clip.
void Reset ()
 Resets the animation sequence for playing anew.
void SetPosition (float pos)
 Sets the current playing position of the animation. NOTE: This method takes loop cycles and loop reversing into account. To set the position without regard to loop cycles or loop reversing, use SetAnimPosition().
void SetAnimPosition (float pos)
 Sets the current playing position of the animation. NOTE: This method does NOT take loop cycles and loop reversing into account. To set the position taking loop cycles and loop reversing into account, use SetPosition().
float GetDuration ()
 Returns the duration, in seconds, of the animation. NOTE: This takes into account loop cycles and loop reverse. Ex: If an animation has a framerate of 30fps, consists of 60 frames, and is set to loop once, the duration will be 4 seconds.
int GetFrameCount ()
 Returns the total number of frames displayed by this animation.
int GetCurPosition ()
 Returns the (zero-based) frame number of the current position in the over all animation. Example: If the multi contains a total of 100 frames and 25 frames have played so far, then 24 will be returned (because it is zero-based). If the multi is playing backwards, this number will count down from 100 as well.
int GetCurClipNum ()
 Returns the (zero-based) index of the current clip.
void SetCurClipNum (int index)
 Sets the current clip by index.

Public Attributes

string name
 The name of the animation sequence.
int loopCycles = 0
 How many times to loop the animation IN ADDITION TO the initial play-through. (-1 to loop infinitely, 0 not to loop at all, 1 to repeat once before stopping, etc.).
bool loopReverse = false
 Reverse the play direction when the end of the animation is reached? If true, a loop iteration isn't counted until the animation returns to the beginning.
float framerate = 15f
 The rate in frames per second at which to play the animation.
UVAnimation.ANIM_END_ACTION onAnimEnd = UVAnimation.ANIM_END_ACTION.Do_Nothing
 What the sprite should do when the animation is done playing. The options are to: 1) Do nothing, 2) return to the static image, 3) play the default animation.
UVAnimation_Auto[] clips
 The actual sprite animation clips that make up the animation sequence.

Properties

int StepDirection [get, set]
 The direction in which the animation is currently set to advance. 1 for forwards, -1 for backwards.

Detailed Description

This class allows you to specify multiple animation "clips" that will play sequentially to the end of the list of clips.


Member Function Documentation

void UVAnimation_Multi.AppendAnim ( int  index,
SPRITE_FRAME[]  anim 
)

Appends UV animation to the clip specified by index.

Parameters:
index The animation clip to append to.
anim Array of ANIM_FRAMEs that define the animation to be appended.
void UVAnimation_Multi.AppendClip ( UVAnimation  clip  ) 

Appends UV animation clip to the end of the animation sequence.

Parameters:
clip Animation clip to append.
UVAnimation_Auto [] UVAnimation_Multi.BuildUVAnim ( SpriteRoot  s  ) 

Builds the UV animations for all animation clips that are a part of this animation sequence.

Parameters:
s The sprite for which to build the animation.
Returns:
Array of animation clips that constitute the animation sequence.
int UVAnimation_Multi.GetCurClipNum (  ) 

Returns the (zero-based) index of the current clip.

Returns:
The (zero-based) index of the current clip.
int UVAnimation_Multi.GetCurPosition (  ) 

Returns the (zero-based) frame number of the current position in the over all animation. Example: If the multi contains a total of 100 frames and 25 frames have played so far, then 24 will be returned (because it is zero-based). If the multi is playing backwards, this number will count down from 100 as well.

Returns:
Zero-based frame number of the current position in the over all animation.
UVAnimation_Auto UVAnimation_Multi.GetCurrentClip (  ) 

Gets a reference to the currently-playing clip.

Returns:
Reference to the currently-playing clip.
SPRITE_FRAME UVAnimation_Multi.GetCurrentFrame (  ) 

Returns the SPRITE_FRAME of the current frame without advancing to the next frame.

Returns:
An SPRITE_FRAME containing the UV coordinates of the current frame.
float UVAnimation_Multi.GetDuration (  ) 

Returns the duration, in seconds, of the animation. NOTE: This takes into account loop cycles and loop reverse. Ex: If an animation has a framerate of 30fps, consists of 60 frames, and is set to loop once, the duration will be 4 seconds.

Returns:
The duration of the animation in seconds. -1 if the animation loops infinitely.
int UVAnimation_Multi.GetFrameCount (  ) 

Returns the total number of frames displayed by this animation.

Returns:
Number of frames to be displayed.
void UVAnimation_Multi.Reset (  ) 

Resets the animation sequence for playing anew.

void UVAnimation_Multi.SetAnim ( int  index,
SPRITE_FRAME[]  frames 
)

Replaces the contents of the specified clip.

Parameters:
index Index of the clip the contents of which you wish to replace.
frames Array of ANIM_FRAMEs that define the content of an animation clip.
void UVAnimation_Multi.SetAnimPosition ( float  pos  ) 

Sets the current playing position of the animation. NOTE: This method does NOT take loop cycles and loop reversing into account. To set the position taking loop cycles and loop reversing into account, use SetPosition().

Parameters:
pos Desired position in the animation (0-1).
void UVAnimation_Multi.SetCurClipNum ( int  index  ) 

Sets the current clip by index.

Parameters:
index The zero-based index of the clip.
void UVAnimation_Multi.SetPosition ( float  pos  ) 

Sets the current playing position of the animation. NOTE: This method takes loop cycles and loop reversing into account. To set the position without regard to loop cycles or loop reversing, use SetAnimPosition().

Parameters:
pos Desired position in the animation (0-1).

Member Data Documentation

The actual sprite animation clips that make up the animation sequence.

The rate in frames per second at which to play the animation.

How many times to loop the animation IN ADDITION TO the initial play-through. (-1 to loop infinitely, 0 not to loop at all, 1 to repeat once before stopping, etc.).

Reverse the play direction when the end of the animation is reached? If true, a loop iteration isn't counted until the animation returns to the beginning.

The name of the animation sequence.

UVAnimation.ANIM_END_ACTION UVAnimation_Multi.onAnimEnd = UVAnimation.ANIM_END_ACTION.Do_Nothing

What the sprite should do when the animation is done playing. The options are to: 1) Do nothing, 2) return to the static image, 3) play the default animation.


Property Documentation

int UVAnimation_Multi.StepDirection [get, set]

The direction in which the animation is currently set to advance. 1 for forwards, -1 for backwards.


The documentation for this class was generated from the following file:

Generated on Thu Sep 8 16:31:21 2011 for EZ GUI by  doxygen 1.6.1