Skip to main content

EquipmentRoomAnimator

A class in Root.Township, the global namespace.

Plays the appear and disappear animations of the equipment customization room: boundary, dummy materialising, particles, ground and pedestal.

Constructors​

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

Fields​

7 private and internal fields
MemberWhat it is
private AltaCoroutine boundaryAnimationRunning boundary coroutine.
private float boundarySpawnAnimationLengthSeconds for the boundary animation. Defaults to 2.
private Transform boundaryTransformThe boundary being animated, given to StartAppearAnimation.
private RendererMaterializer dummyMaterializerMaterialises and dematerialises the dummy's renderers.
private GameObject dummyParticlesParticle prefab spawned on appear and disappear.
private Animator groundVisualsAnimatorGround animator; gets the "Exit" trigger on disappear.
private CurveScaler pedestalAnimatorPedestal scale animator, turned on and off.

Methods​

MemberWhat it is
void StartAppearAnimation(Transform boundaryTransform, float dummyMaterializationDuration)Plays the appear animations and materialises the dummy over the given time.
void StartDissapearAnimation(Action animationsFinishedCallback, float dummyMaterializationDuration)Plays the disappear animations and calls back once the dummy is gone and the boundary has finished.
2 private and internal methods
MemberWhat it is
private IEnumerator AnimateBoundarySpawn(float totalDuration, bool isAppearing) (iterator)Coroutine that slides the boundary up from 1 unit below and scales it in, or the reverse.
private IEnumerator WaitForAnimationFinished(Action animationsFinishedCallback) (iterator)Waits for the boundary animation to finish, then calls the callback.

Used in​

Members of other types that take, return or hold a EquipmentRoomAnimator: