LeverToEvents
A class in Root.Township, the global namespace.
Raises a UnityEvent when a SelectionLever on the same object changes position, optionally on the server only.
- Listed in Global namespace: I to L
- Inherits or implements
MonoBehaviour - Attributes
RequireComponent - Documented in Buttons and levers
Constructors
| Member | What it is |
|---|---|
LeverToEvents() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
Methods
2 private and internal methods
| Member | What it is |
|---|---|
private void Awake() | Hooks the lever's SelectionChanged, unless isServerOnly is set and this isn't the server. |
private void TriggerEvents(SelectionLever lever, int oldIndex, int newIndex) | Raises onPosition0 for index 0 and onPosition1 for any other index. |