Corgi Engine  v9.1
MoreMountains.MMInterface.MMSwitch Class Reference

A component to handle switches More...

Inheritance diagram for MoreMountains.MMInterface.MMSwitch:

Public Types

enum  SwitchStates { SwitchStates.Left, SwitchStates.Right }
 the possible states of the switch More...
 

Public Member Functions

virtual void InitializeState ()
 
virtual void SwitchState ()
 Use this method to go from one state to the other More...
 

Public Attributes

MMSpriteReplace SwitchKnob
 a SpriteReplace to represent the switch knob More...
 
SwitchStates InitialState = SwitchStates.Left
 the state the switch should start in More...
 
UnityEvent SwitchOn
 the methods to call when the switch is turned on More...
 
UnityEvent SwitchOff
 the methods to call when the switch is turned off More...
 

Protected Member Functions

override void Initialization ()
 On init, we set our current switch state More...
 

Properties

SwitchStates CurrentSwitchState [get, set]
 the current state of the switch More...
 

Detailed Description

A component to handle switches

Member Enumeration Documentation

◆ SwitchStates

the possible states of the switch

Enumerator
Left 
Right 

Member Function Documentation

◆ Initialization()

override void MoreMountains.MMInterface.MMSwitch.Initialization ( )
protected

On init, we set our current switch state

◆ InitializeState()

virtual void MoreMountains.MMInterface.MMSwitch.InitializeState ( )
virtual

◆ SwitchState()

virtual void MoreMountains.MMInterface.MMSwitch.SwitchState ( )
virtual

Use this method to go from one state to the other

Member Data Documentation

◆ InitialState

SwitchStates MoreMountains.MMInterface.MMSwitch.InitialState = SwitchStates.Left

the state the switch should start in

◆ SwitchKnob

MMSpriteReplace MoreMountains.MMInterface.MMSwitch.SwitchKnob

a SpriteReplace to represent the switch knob

◆ SwitchOff

UnityEvent MoreMountains.MMInterface.MMSwitch.SwitchOff

the methods to call when the switch is turned off

◆ SwitchOn

UnityEvent MoreMountains.MMInterface.MMSwitch.SwitchOn

the methods to call when the switch is turned on

Property Documentation

◆ CurrentSwitchState

SwitchStates MoreMountains.MMInterface.MMSwitch.CurrentSwitchState
getset

the current state of the switch


The documentation for this class was generated from the following file: