Skip to main content

AnimateTime

A class in Root.Township, the global namespace.

Client visual that clones a pip around a circle and pulses their height in a travelling wave, like a spinner.

Constructors​

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

Fields​

6 private and internal fields
MemberWhat it is
private float animationSpeedWave cycles per second.
private float currentProgressCurrent wave phase, 0 to 1.
private Transform pipThe template pip, also used as the first one.
private int pipCountHow many pips go around the circle.
private Transform[] pipsAll pip transforms, made in Awake.
private AnimationCurve scaleCurveMaps the wave value (a cosine, -1 to 1) to a pip's Y scale.

Methods​

3 private and internal methods
MemberWhat it is
private void Awake()Makes pipCount copies of the pip, spaced evenly around the forward axis.
private void OnDrawGizmosSelected()Empty.
private void Update()Advances the wave and sets each pip's Y scale from scaleCurve.