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...
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 
◆ Initialization()
  
  | 
        
          | virtual void Lofelt.NiceVibrations.MMSpriteReplace.Initialization | ( |  | ) |  |  | protectedvirtual | 
 
On init, we grab our image component, and set our sprite in its initial state 
 
 
◆ SpriteOff()
  
  | 
        
          | virtual void Lofelt.NiceVibrations.MMSpriteReplace.SpriteOff | ( |  | ) |  |  | protectedvirtual | 
 
sets the image's sprite to off 
 
 
◆ SpriteOn()
  
  | 
        
          | virtual void Lofelt.NiceVibrations.MMSpriteReplace.SpriteOn | ( |  | ) |  |  | protectedvirtual | 
 
sets the image's sprite to on 
 
 
◆ Start()
  
  | 
        
          | virtual void Lofelt.NiceVibrations.MMSpriteReplace.Start | ( |  | ) |  |  | protectedvirtual | 
 
On Start we initialize our button 
 
 
◆ Swap()
  
  | 
        
          | virtual void Lofelt.NiceVibrations.MMSpriteReplace.Swap | ( |  | ) |  |  | virtual | 
 
A public method to change the sprite 
 
 
◆ SwitchToOffSprite()
  
  | 
        
          | virtual void Lofelt.NiceVibrations.MMSpriteReplace.SwitchToOffSprite | ( |  | ) |  |  | virtual | 
 
a public method to switch to off sprite directly 
 
 
◆ SwitchToOnSprite()
  
  | 
        
          | virtual void Lofelt.NiceVibrations.MMSpriteReplace.SwitchToOnSprite | ( |  | ) |  |  | virtual | 
 
a public method to switch to on sprite directly 
 
 
◆ _image
  
  | 
        
          | Image Lofelt.NiceVibrations.MMSpriteReplace._image |  | protected | 
 
 
◆ _mmTouchButton
  
  | 
        
          | MMTouchButton Lofelt.NiceVibrations.MMSpriteReplace._mmTouchButton |  | protected | 
 
 
◆ _spriteRenderer
  
  | 
        
          | SpriteRenderer Lofelt.NiceVibrations.MMSpriteReplace._spriteRenderer |  | protected | 
 
 
◆ OffSprite
      
        
          | Sprite Lofelt.NiceVibrations.MMSpriteReplace.OffSprite | 
      
 
the sprite to use when in the "off" state 
 
 
◆ OnSprite
      
        
          | Sprite Lofelt.NiceVibrations.MMSpriteReplace.OnSprite | 
      
 
the sprite to use when in the "on" state 
 
 
◆ StartsOn
      
        
          | bool Lofelt.NiceVibrations.MMSpriteReplace.StartsOn = true | 
      
 
if this is true, the button will start if "on" state 
 
 
◆ CurrentValue
  
  | 
        
          | bool Lofelt.NiceVibrations.MMSpriteReplace.CurrentValue |  | get | 
 
the current state of the button 
 
 
The documentation for this class was generated from the following file: