Inherits MonoBehaviour.
Public Member Functions | |
| delegate void | AnimCompleteDelegate (SuperSprite sprite) |
| void | PlayAnim (SuperSpriteAnim anim) |
| Plays the specified SuperSprite animation. More... | |
| void | PlayAnim (int index) |
| Plays the specified SuperSprite animation. More... | |
| void | PlayAnim (string anim) |
| Plays the specified SuperSprite animation. More... | |
| void | DoAnim (SuperSpriteAnim anim) |
| Plays the specified SuperSprite animation, but only if it isn't playing already. More... | |
| void | DoAnim (int index) |
| Plays the specified SuperSprite animation, but only if it isn't playing already. More... | |
| void | DoAnim (string name) |
| Plays the specified SuperSprite animation, but only if it isn't playing already. More... | |
| void | StopAnim () |
| Stops the current animation from playing and resets it to the beginning for playing again. More... | |
| void | PauseAnim () |
| Pauses the currently playing animation. More... | |
| void | UnpauseAnim () |
| Resumes an animation from where it left off previously. More... | |
| void | Hide (bool tf) |
| Hides the SuperSprite. More... | |
| bool | IsHidden () |
| Returns whether the SuperSprite is hidden. More... | |
| SuperSpriteAnim | GetCurAnim () |
| SuperSpriteAnim | GetAnim (int index) |
| Returns the SuperSpriteAnim at the specified index. More... | |
| SuperSpriteAnim | GetAnim (string name) |
| Returns the SuperSpriteAnim with the specified name. More... | |
| bool | IsAnimating () |
| Returns whether an animation is playing. More... | |
| void | SetAnimCompleteDelegate (AnimCompleteDelegate del) |
| Sets the delegate to be called upon animation completion. More... | |
| void | SetAnimFrameDelegate (SpriteBase.AnimFrameDelegate del) |
| Sets the delegate to be called each frame of animation. More... | |
Public Attributes | |
| bool | playDefaultAnimOnStart = false |
| Whether or not to play the default animation when the object is started. More... | |
| int | defaultAnim = 0 |
| The default animation. More... | |
| SuperSpriteAnim[] | animations = new SuperSpriteAnim[0] |
| The animations that comprise this SuperSprite. More... | |
Properties | |
| SpriteRoot | CurrentSprite [get] |
| Returns a reference to the sprite that is currently showing for the current animation, if any. More... | |
Wraps functionality of multiple sprites, allowing you to define animations on multiple sprites, which may use multiple materials/atlases, and then link them together and use them at runtime as though they were a single sprite.
Definition at line 473 of file SuperSprite.cs.
| delegate void SuperSprite.AnimCompleteDelegate | ( | SuperSprite | sprite | ) |
Defines a delegate that can be called upon animation completion. Use this if you want something to happen as soon as an animation reaches the end. Receives a reference to the SuperSprite.
| sprite | A reference to the SuperSprite whose animation has finished. |
| void SuperSprite.DoAnim | ( | SuperSpriteAnim | anim | ) |
Plays the specified SuperSprite animation, but only if it isn't playing already.
| anim | The SuperSprite animation to be played. |
Definition at line 583 of file SuperSprite.cs.
| void SuperSprite.DoAnim | ( | int | index | ) |
Plays the specified SuperSprite animation, but only if it isn't playing already.
| index | The index of the SuperSprite animation to be played. |
Definition at line 594 of file SuperSprite.cs.
| void SuperSprite.DoAnim | ( | string | name | ) |
Plays the specified SuperSprite animation, but only if it isn't playing already.
| anim | The name of the SuperSprite animation to be played. |
Definition at line 607 of file SuperSprite.cs.
| SuperSpriteAnim SuperSprite.GetAnim | ( | int | index | ) |
Returns the SuperSpriteAnim at the specified index.
| index | The index of the desired animation. |
Definition at line 720 of file SuperSprite.cs.
| SuperSpriteAnim SuperSprite.GetAnim | ( | string | name | ) |
Returns the SuperSpriteAnim with the specified name.
| name | The name of the desired animation. |
Definition at line 733 of file SuperSprite.cs.
| SuperSpriteAnim SuperSprite.GetCurAnim | ( | ) |
Returns a reference to the currently selected animation. NOTE: This does not mean the animation is currently playing. To determine whether the animation is playing, use IsAnimating
Definition at line 694 of file SuperSprite.cs.
| void SuperSprite.Hide | ( | bool | tf | ) |
| bool SuperSprite.IsAnimating | ( | ) |
Returns whether an animation is playing.
Definition at line 746 of file SuperSprite.cs.
| bool SuperSprite.IsHidden | ( | ) |
Returns whether the SuperSprite is hidden.
Definition at line 678 of file SuperSprite.cs.
| void SuperSprite.PauseAnim | ( | ) |
Pauses the currently playing animation.
Definition at line 631 of file SuperSprite.cs.
| void SuperSprite.PlayAnim | ( | SuperSpriteAnim | anim | ) |
Plays the specified SuperSprite animation.
| anim | The SuperSprite animation to be played. |
Definition at line 534 of file SuperSprite.cs.
| void SuperSprite.PlayAnim | ( | int | index | ) |
Plays the specified SuperSprite animation.
| index | The index of the SuperSprite animation to be played. |
Definition at line 556 of file SuperSprite.cs.
| void SuperSprite.PlayAnim | ( | string | anim | ) |
Plays the specified SuperSprite animation.
| anim | The name of the SuperSprite animation to be played. |
Definition at line 568 of file SuperSprite.cs.
| void SuperSprite.SetAnimCompleteDelegate | ( | AnimCompleteDelegate | del | ) |
Sets the delegate to be called upon animation completion.
| del | The delegate to be called when an animation finishes playing. |
Definition at line 792 of file SuperSprite.cs.
| void SuperSprite.SetAnimFrameDelegate | ( | SpriteBase.AnimFrameDelegate | del | ) |
Sets the delegate to be called each frame of animation.
| del | The delegate to be called each frame of animation. |
Definition at line 801 of file SuperSprite.cs.
| void SuperSprite.StopAnim | ( | ) |
Stops the current animation from playing and resets it to the beginning for playing again.
Definition at line 620 of file SuperSprite.cs.
| void SuperSprite.UnpauseAnim | ( | ) |
Resumes an animation from where it left off previously.
Definition at line 642 of file SuperSprite.cs.
| SuperSpriteAnim [] SuperSprite.animations = new SuperSpriteAnim[0] |
The animations that comprise this SuperSprite.
Definition at line 498 of file SuperSprite.cs.
| int SuperSprite.defaultAnim = 0 |
The default animation.
Definition at line 493 of file SuperSprite.cs.
| bool SuperSprite.playDefaultAnimOnStart = false |
Whether or not to play the default animation when the object is started.
Definition at line 488 of file SuperSprite.cs.
|
get |
Returns a reference to the sprite that is currently showing for the current animation, if any.
Definition at line 705 of file SuperSprite.cs.