Skip to main content

ProfessionDiskAvailablePointsVisualizer

A class in Root.Township, the global namespace.

Client: skill shrine visual for one profession path's available points. Shows the tree icon and fades it and the fill in or out, with particles while open.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private static readonly int _AlphaShader property id for the icon's alpha.
private static readonly int _AlphaLimitShader property id for the fill's alpha limit.
private ParticleSystem particlesParticles played while open.
private Coroutine runningAnimationThe fade currently running.
private SpriteRenderer spriteRendererShows the path's tree icon.

Methods​

MemberWhat it is
override void Disable()Fades out and stops the particles.
override void SetPath(ProgressionPath path)Sets the path, shows its tree icon and resets to hidden.
protected override void OpenInternal()Plays the particles and fades in.
2 private and internal methods
MemberWhat it is
private void Animate(float target)Starts a fade to the given alpha, stopping any fade already running.
private IEnumerator RunAnimation(float target) (iterator)Coroutine that fades the icon's _Alpha and the fill's _AlphaLimit to the target.