A class in Root.Township, the global namespace.
Rotates a coin press gear to follow a lever's value.
Constructors
| Member | What it is |
|---|
CoinPressGear() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private Vector3 axis | Local axis the gear turns around. |
private Lever lever | Lever that drives the gear. |
private float rangeOfMotionDegress | Degrees turned at full lever value. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void Awake() | Hooks the lever's value change. |
private void ValueChanged(Lever lever, float oldValue, float newValue) | Sets local rotation to rangeOfMotionDegress times the lever value around axis. |