Switches can be used to trigger actions based on their current state (on or off). Useful to open doors, chests, portals, bridges...
More...
|
| virtual void | Start () |
| | On init, we set our current switch state.
|
| virtual void | Update () |
| | On Update, we update our switch's animator.
|
Switches can be used to trigger actions based on their current state (on or off). Useful to open doors, chests, portals, bridges...
◆ SwitchStates
the possible states of the switch
◆ Start()
| virtual void MoreMountains.TopDownEngine.Switch.Start |
( |
| ) |
|
|
protectedvirtual |
On init, we set our current switch state.
◆ ToggleSwitch()
| virtual void MoreMountains.TopDownEngine.Switch.ToggleSwitch |
( |
| ) |
|
|
virtual |
Use this method to go from one state to the other.
◆ TurnSwitchOff()
| virtual void MoreMountains.TopDownEngine.Switch.TurnSwitchOff |
( |
| ) |
|
|
virtual |
◆ TurnSwitchOn()
| virtual void MoreMountains.TopDownEngine.Switch.TurnSwitchOn |
( |
| ) |
|
|
virtual |
◆ Update()
| virtual void MoreMountains.TopDownEngine.Switch.Update |
( |
| ) |
|
|
protectedvirtual |
On Update, we update our switch's animator.
◆ InitialState
the state the switch should start in
◆ SwitchAnimator
| Animator MoreMountains.TopDownEngine.Switch.SwitchAnimator |
a SpriteReplace to represent the switch knob when it's on
◆ SwitchOff
| UnityEvent MoreMountains.TopDownEngine.Switch.SwitchOff |
the methods to call when the switch is turned off
◆ SwitchOffButton
| bool MoreMountains.TopDownEngine.Switch.SwitchOffButton |
a test button to turn the switch off
◆ SwitchOffFeedback
| MMFeedbacks MoreMountains.TopDownEngine.Switch.SwitchOffFeedback |
a feedback to play when the switch is turned off
◆ SwitchOn
| UnityEvent MoreMountains.TopDownEngine.Switch.SwitchOn |
the methods to call when the switch is turned on
◆ SwitchOnButton
| bool MoreMountains.TopDownEngine.Switch.SwitchOnButton |
a test button to turn the switch on
◆ SwitchOnFeedback
| MMFeedbacks MoreMountains.TopDownEngine.Switch.SwitchOnFeedback |
a feedback to play when the switch is toggled on
◆ SwitchToggle
| UnityEvent MoreMountains.TopDownEngine.Switch.SwitchToggle |
the methods to call when the switch is toggled
◆ ToggleFeedback
| MMFeedbacks MoreMountains.TopDownEngine.Switch.ToggleFeedback |
a feedback to play when the switch changes state
◆ ToggleSwitchButton
| bool MoreMountains.TopDownEngine.Switch.ToggleSwitchButton |
a test button to change the switch's state
◆ CurrentSwitchState
| virtual SwitchStates MoreMountains.TopDownEngine.Switch.CurrentSwitchState |
|
getset |
the current state of the switch
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Environment/Switch.cs