Skip to main content

DelayedEnableLerp

A class in Root.Township, the global namespace.

An EnableLerp that waits a set time before starting its enable or disable animation.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private Coroutine delayCoroutineThe pending delay, if any.
private float delayToDisableSeconds to wait before animating to disabled.
private float delayToEnableSeconds to wait before animating to enabled.

Methods​

MemberWhat it is
protected override void StartAnimation()Cancels any pending delay, then starts now if the delay for this direction is 0, or after it otherwise.
1 private and internal method
MemberWhat it is
private IEnumerator Delay() (iterator)Waits the delay for the current direction, then starts the animation.