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. |
This class allows you to specify multiple animation "clips" that will play sequentially to the end of the list of clips.
void UVAnimation_Multi.AppendAnim | ( | int | index, | |
SPRITE_FRAME[] | anim | |||
) |
Appends UV animation to the clip specified by index.
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.
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.
s | The sprite for which to build the animation. |
int UVAnimation_Multi.GetCurClipNum | ( | ) |
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.
UVAnimation_Auto UVAnimation_Multi.GetCurrentClip | ( | ) |
Gets a 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.
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.
int UVAnimation_Multi.GetFrameCount | ( | ) |
Returns the total number of frames displayed by this animation.
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.
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().
pos | Desired position in the animation (0-1). |
void UVAnimation_Multi.SetCurClipNum | ( | int | index | ) |
Sets the current clip by index.
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().
pos | Desired position in the animation (0-1). |
The actual sprite animation clips that make up the animation sequence.
float UVAnimation_Multi.framerate = 15f |
The rate in frames per second at which to play the animation.
int UVAnimation_Multi.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 UVAnimation_Multi.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.
string UVAnimation_Multi.name |
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.
int UVAnimation_Multi.StepDirection [get, set] |
The direction in which the animation is currently set to advance. 1 for forwards, -1 for backwards.