Skip to main content

CaveTeleporterReplacerAnimator

A class in Root.Township, the global namespace.

Runs the dissolve swap between a cave teleporter and its replacement using the material and curves in CaveTeleportSettings. On a headless server it just waits the animation length.

Constructors​

1 private and internal constructor
MemberWhat it is
private CaveTeleporterReplacerAnimator(RendererGroup originalRenderers, NetworkEntity replacing, Action<NetworkEntity> finished)Creates a CaveTeleporterReplacerAnimator from originalRenderers, replacing and finished.

Fields​

2 private and internal fields
MemberWhat it is
private Action finishedCallback run when the animation is done.
private CaveTeleportSettings settingsThe CaveTeleportSettings global settings used for material, curves and duration.

Methods​

MemberWhat it is
static void AnimateReplace(RendererGroup originalRenderers, NetworkEntity replacing, Action<NetworkEntity> finished)Starts the animation, then calls finished with the replacing entity when it ends.
1 private and internal method
MemberWhat it is
private IEnumerator Animation(RendererGroup originalRenderers, NetworkEntity replacing) (iterator)Coroutine: swaps both objects to an animating material, drives progress over the duration, then hides the old one and restores the new one.