Infinite Runner Engine v1.9
|
A class to add to an Image or SpriteRenderer to have it act like a button with a different sprite for on and off states More...
Public Member Functions | |
virtual void | Swap () |
A public method to change the sprite More... | |
virtual void | SwitchToOffSprite () |
a public method to switch to off sprite directly More... | |
virtual void | SwitchToOnSprite () |
a public method to switch to on sprite directly More... | |
Public Attributes | |
Sprite | OnSprite |
the sprite to use when in the "on" state More... | |
Sprite | OffSprite |
the sprite to use when in the "off" state More... | |
bool | StartsOn = true |
if this is true, the button will start if "on" state More... | |
bool | SwapButton |
bool | SwitchToOffSpriteButton |
bool | SwitchToOnSpriteButton |
Protected Member Functions | |
virtual void | Start () |
On Start we initialize our button More... | |
virtual void | Initialization () |
On init, we grab our image component, and set our sprite in its initial state More... | |
virtual void | SpriteOff () |
sets the image's sprite to off More... | |
virtual void | SpriteOn () |
sets the image's sprite to on More... | |
Protected Attributes | |
Image | _image |
SpriteRenderer | _spriteRenderer |
MMTouchButton | _mmTouchButton |
Properties | |
bool | CurrentValue [get] |
the current state of the button More... | |
A class to add to an Image or SpriteRenderer to have it act like a button with a different sprite for on and off states
|
protectedvirtual |
On init, we grab our image component, and set our sprite in its initial state
Reimplemented in MoreMountains.MMInterface.MMRadioButton.
|
protectedvirtual |
sets the image's sprite to off
|
protectedvirtual |
sets the image's sprite to on
Reimplemented in MoreMountains.MMInterface.MMRadioButton.
|
protectedvirtual |
On Start we initialize our button
|
virtual |
A public method to change the sprite
|
virtual |
a public method to switch to off sprite directly
|
virtual |
a public method to switch to on sprite directly
|
protected |
|
protected |
|
protected |
Sprite MoreMountains.MMInterface.MMSpriteReplace.OffSprite |
the sprite to use when in the "off" state
Sprite MoreMountains.MMInterface.MMSpriteReplace.OnSprite |
the sprite to use when in the "on" state
bool MoreMountains.MMInterface.MMSpriteReplace.StartsOn = true |
if this is true, the button will start if "on" state
bool MoreMountains.MMInterface.MMSpriteReplace.SwapButton |
bool MoreMountains.MMInterface.MMSpriteReplace.SwitchToOffSpriteButton |
bool MoreMountains.MMInterface.MMSpriteReplace.SwitchToOnSpriteButton |
|
get |
the current state of the button