Skip to main content

EcholocationEffect

A class in Root.Township, the global namespace.

Pooled visual effect that plays an expanding shader pulse once and returns itself to the pool.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private static readonly int _HasUndersideShader property ID for _HasUnderside.
private static readonly int _ProgressShader property ID for _Progress.
private Renderer effectRendererRenderer that shows the pulse.
private Material materialMaterial copy being animated.

Methods​

MemberWhat it is
void Setup(Vector3 scale, float duration, AnimationCurve curve, bool hasUnderside)Sets the scale and underside flag and starts the animation.
3 private and internal methods
MemberWhat it is
private IEnumerator Animate(float duration, AnimationCurve curve) (iterator)Coroutine that drives _Progress along the curve over the duration, then releases.
private void Awake()Takes a tracked copy of the renderer's material.
private void OnDrawGizmosSelected()Draws the renderer bounds in the editor.