Skip to main content

CoinPressGear

A class in Root.Township, the global namespace.

Rotates a coin press gear to follow a lever's value.

Constructors​

MemberWhat it is
CoinPressGear()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private Vector3 axisLocal axis the gear turns around.
private Lever leverLever that drives the gear.
private float rangeOfMotionDegressDegrees turned at full lever value.

Methods​

2 private and internal methods
MemberWhat 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.