Public Types | |
enum | ANIM_END_ACTION { ANIM_END_ACTION.Do_Nothing, ANIM_END_ACTION.Play_Default_Anim, ANIM_END_ACTION.Deactivate, ANIM_END_ACTION.Destroy } |
Public Member Functions | |
void | Reset () |
Resets the animation to the beginning. More... | |
void | Play () |
Starts the animation to playing. More... | |
void | Stop () |
Stops the animation playing. More... | |
void | Pause () |
Pauses the animation. More... | |
void | Unpause () |
Unpauses the animation. More... | |
void | Hide (bool tf) |
Hides the sprite of the current animation. More... | |
bool | IsHidden () |
Returns whether the current sprite in this animation is hidden: More... | |
void | Delete () |
Calls Delete() on each constituent sprite. More... | |
Public Attributes | |
int | index |
Index of this animation in the SuperSprite's list More... | |
string | name |
Name of the animation. More... | |
SuperSpriteAnimElement[] | spriteAnims = new SuperSpriteAnimElement[0] |
The actual sprite animations to use. More... | |
int | loopCycles = 0 |
How many times to loop the animation, IN ADDITION to the initial play-through. 0 indicates to place the animation once then stop. 1 indicates to repeat the animation once before stopping, and so on. More... | |
bool | pingPong = false |
Reverse the play direction when the end of the animation is reached? (Ping-pong) If true, a loop iteration isn't counted until the animation returns to the beginning. NOTE: This automatically plays the constituent animations in reverse when going back through the animation list, so keep that in mind when creating your individual sprite animations. More... | |
ANIM_END_ACTION | onAnimEnd = ANIM_END_ACTION.Do_Nothing |
What the SuperSprite should do when the animation is done playing. More... | |
bool | deactivateNonPlaying = false |
When set to true, non-playing sprites' GameObjects will be deactivated and not merely hidden. More... | |
bool | deactivateRecursively = false |
When set to true, non-playing sprites' GameObjecs will be deactivated recursively. NOTE: Only has effect if deactivateNonPlaying is set to true. More... | |
Properties | |
bool | IsRunning [get] |
Tells whether the animation is running. More... | |
SpriteBase | CurrentSprite [get] |
Returns a reference to the sprite currently showing for this animation. Returns null if no sprite is the current one. More... | |
Defines animations to be used with the SuperSprite class. Each animation consists of references to one or more AutoSpriteBase objects and the name of one of its animations, which will be played sequentially.
Definition at line 102 of file SuperSprite.cs.
The action to take when an animation ends.
Enumerator | |
---|---|
Do_Nothing |
Do nothing when the animation ends. |
Play_Default_Anim |
Play the default animation when the animation ends. |
Deactivate |
Deactivate the SuperSprite when the animation ends (sets the GameObject's .active property to false). |
Destroy |
Destroys the SuperSprite when the animation ends. |
Definition at line 107 of file SuperSprite.cs.
void SuperSpriteAnim.Delete | ( | ) |
Calls Delete() on each constituent sprite.
Definition at line 452 of file SuperSprite.cs.
void SuperSpriteAnim.Hide | ( | bool | tf | ) |
Hides the sprite of the current animation.
tf | Whether to hide the animation. |
Definition at line 409 of file SuperSprite.cs.
bool SuperSpriteAnim.IsHidden | ( | ) |
Returns whether the current sprite in this animation is hidden:
Definition at line 422 of file SuperSprite.cs.
void SuperSpriteAnim.Pause | ( | ) |
Pauses the animation.
Definition at line 366 of file SuperSprite.cs.
void SuperSpriteAnim.Play | ( | ) |
Starts the animation to playing.
Definition at line 335 of file SuperSprite.cs.
void SuperSpriteAnim.Reset | ( | ) |
Resets the animation to the beginning.
Definition at line 319 of file SuperSprite.cs.
void SuperSpriteAnim.Stop | ( | ) |
Stops the animation playing.
Definition at line 354 of file SuperSprite.cs.
void SuperSpriteAnim.Unpause | ( | ) |
Unpauses the animation.
Definition at line 375 of file SuperSprite.cs.
bool SuperSpriteAnim.deactivateNonPlaying = false |
When set to true, non-playing sprites' GameObjects will be deactivated and not merely hidden.
Definition at line 180 of file SuperSprite.cs.
bool SuperSpriteAnim.deactivateRecursively = false |
When set to true, non-playing sprites' GameObjecs will be deactivated recursively. NOTE: Only has effect if deactivateNonPlaying is set to true.
Definition at line 187 of file SuperSprite.cs.
int SuperSpriteAnim.index |
Index of this animation in the SuperSprite's list
Definition at line 138 of file SuperSprite.cs.
int SuperSpriteAnim.loopCycles = 0 |
How many times to loop the animation, IN ADDITION to the initial play-through. 0 indicates to place the animation once then stop. 1 indicates to repeat the animation once before stopping, and so on.
Definition at line 157 of file SuperSprite.cs.
string SuperSpriteAnim.name |
Name of the animation.
Definition at line 143 of file SuperSprite.cs.
ANIM_END_ACTION SuperSpriteAnim.onAnimEnd = ANIM_END_ACTION.Do_Nothing |
What the SuperSprite should do when the animation is done playing.
Definition at line 174 of file SuperSprite.cs.
bool SuperSpriteAnim.pingPong = false |
Reverse the play direction when the end of the animation is reached? (Ping-pong) If true, a loop iteration isn't counted until the animation returns to the beginning. NOTE: This automatically plays the constituent animations in reverse when going back through the animation list, so keep that in mind when creating your individual sprite animations.
Definition at line 169 of file SuperSprite.cs.
SuperSpriteAnimElement [] SuperSpriteAnim.spriteAnims = new SuperSpriteAnimElement[0] |
The actual sprite animations to use.
Definition at line 148 of file SuperSprite.cs.
|
get |
Returns a reference to the sprite currently showing for this animation. Returns null if no sprite is the current one.
Definition at line 395 of file SuperSprite.cs.
|
get |
Tells whether the animation is running.
Definition at line 385 of file SuperSprite.cs.