Skip to main content

Spinner

A class in Root.Township, the global namespace.

Client visual that spins an object each frame and loops its Z scale along a curve. Turns itself off on headless servers.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private float progressPosition in the scale loop, 0 to 1.
private float rotationDegrees turned per frame, not per second.
private Vector3 rotationAxisLocal axis to spin around.
private DurationCurve scaleCurveCurve and duration for the looping Z scale.

Methods​

2 private and internal methods
MemberWhat it is
private void OnEnable()Disables itself on headless builds and restarts the scale loop.
private void Update()Rotates by rotation degrees and sets Z scale from the curve.