A class to add to a button so that its sprite cycles through X sprites when pressed.
More...
|
| virtual void | Swap () |
| | Changes the image's sprite to the next sprite in the list.
|
| virtual void | SwitchToRandom () |
| virtual void | SwitchToIndex (int index) |
| | A public method to set the sprite directly to the one specified in parameters.
|
| virtual void | Animate () |
|
| Sprite[] | Sprites |
| | the list of sprites to cycle through
|
| int | StartIndex = 0 |
| | the sprite index to start on
|
| int | FrameRate = 10 |
| | when calling Animate (ideally at Update), the framerate to apply (number of frames per second)
|
|
| virtual void | Start () |
| | On Start we initialize our cycler.
|
| virtual void | Initialization () |
| | On init, we grab our image component, and set our first sprite as specified.
|
A class to add to a button so that its sprite cycles through X sprites when pressed.
◆ Animate()
| virtual void MoreMountains.MMInterface.MMSpriteReplaceCycle.Animate |
( |
| ) |
|
|
virtual |
◆ Initialization()
| virtual void MoreMountains.MMInterface.MMSpriteReplaceCycle.Initialization |
( |
| ) |
|
|
protectedvirtual |
On init, we grab our image component, and set our first sprite as specified.
◆ Start()
| virtual void MoreMountains.MMInterface.MMSpriteReplaceCycle.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our cycler.
◆ Swap()
| virtual void MoreMountains.MMInterface.MMSpriteReplaceCycle.Swap |
( |
| ) |
|
|
virtual |
Changes the image's sprite to the next sprite in the list.
◆ SwitchToIndex()
| virtual void MoreMountains.MMInterface.MMSpriteReplaceCycle.SwitchToIndex |
( |
int | index | ) |
|
|
virtual |
A public method to set the sprite directly to the one specified in parameters.
- Parameters
-
◆ SwitchToRandom()
| virtual void MoreMountains.MMInterface.MMSpriteReplaceCycle.SwitchToRandom |
( |
| ) |
|
|
virtual |
◆ _currentIndex
| int MoreMountains.MMInterface.MMSpriteReplaceCycle._currentIndex = 0 |
|
protected |
◆ _image
| Image MoreMountains.MMInterface.MMSpriteReplaceCycle._image |
|
protected |
◆ _imageIsNull
| bool MoreMountains.MMInterface.MMSpriteReplaceCycle._imageIsNull = false |
|
protected |
◆ _initialized
| bool MoreMountains.MMInterface.MMSpriteReplaceCycle._initialized = false |
|
protected |
◆ _mmTouchButton
| MMTouchButton MoreMountains.MMInterface.MMSpriteReplaceCycle._mmTouchButton |
|
protected |
◆ _spriteRenderer
| SpriteRenderer MoreMountains.MMInterface.MMSpriteReplaceCycle._spriteRenderer |
|
protected |
◆ _spriteRendererIsNull
| bool MoreMountains.MMInterface.MMSpriteReplaceCycle._spriteRendererIsNull = false |
|
protected |
◆ _timePerFrame
| float MoreMountains.MMInterface.MMSpriteReplaceCycle._timePerFrame = 0f |
|
protected |
◆ _timeSinceLastFrame
| float MoreMountains.MMInterface.MMSpriteReplaceCycle._timeSinceLastFrame = 0f |
|
protected |
◆ FrameRate
| int MoreMountains.MMInterface.MMSpriteReplaceCycle.FrameRate = 10 |
when calling Animate (ideally at Update), the framerate to apply (number of frames per second)
◆ Sprites
| Sprite [] MoreMountains.MMInterface.MMSpriteReplaceCycle.Sprites |
the list of sprites to cycle through
◆ StartIndex
| int MoreMountains.MMInterface.MMSpriteReplaceCycle.StartIndex = 0 |
the sprite index to start on
The documentation for this class was generated from the following file: