Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.MMInterface.MMSpriteReplaceCycle Class Reference

A class to add to a button so that its sprite cycles through X sprites when pressed More...

Inheritance diagram for MoreMountains.MMInterface.MMSpriteReplaceCycle:

Public Member Functions

virtual void Swap ()
 Changes the image's sprite to the next sprite in the list More...
 
virtual void SwitchToIndex (int index)
 A public method to set the sprite directly to the one specified in parameters More...
 

Public Attributes

Sprite[] Sprites
 the list of sprites to cycle through More...
 
int StartIndex = 0
 the sprite index to start on More...
 

Protected Member Functions

virtual void Start ()
 On Start we initialize our cycler More...
 
virtual void Initialization ()
 On init, we grab our image component, and set our first sprite as specified More...
 

Protected Attributes

Image _image
 
MMTouchButton _mmTouchButton
 
int _currentIndex = 0
 

Detailed Description

A class to add to a button so that its sprite cycles through X sprites when pressed

Member Function Documentation

◆ 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
indexIndex.

Member Data Documentation

◆ _currentIndex

int MoreMountains.MMInterface.MMSpriteReplaceCycle._currentIndex = 0
protected

◆ _image

Image MoreMountains.MMInterface.MMSpriteReplaceCycle._image
protected

◆ _mmTouchButton

MMTouchButton MoreMountains.MMInterface.MMSpriteReplaceCycle._mmTouchButton
protected

◆ 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: