A class in Root.Township, the global namespace.
Client visual for one orb socket in the bought-skills display: animates rotator pieces open or closed and lerps a colour. Driven by BoughtSkillVisualizer.
Constructors
| Member | What it is |
|---|
SkillOrbHolder() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
| Member | What it is |
|---|
private float animationDuration | Seconds an open or close animation takes (0.5 by default). |
private ColorLerp colorLerp | Colour lerp that lights the holder. |
private bool hasSkill | True when the holder was closed with a skill in it; the colour then stays lit during the animation. |
private bool isOpen | Current open state. |
private QuaternionRotationSlerp[] rotators | Child pieces that rotate as the holder opens and closes. |
private Coroutine runningcoroutine | The animation coroutine currently running, stopped when a new one starts. |
private float value | Current animation progress, 0 closed to 1 open. |
Methods
| Member | What it is |
|---|
void Close(bool isFillingSkill) | Closes the holder. Pass true when a skill fills it, which keeps the colour lit. |
void Open() | Opens the holder and marks it as having no skill. |
4 private and internal methods
| Member | What it is |
|---|
private IEnumerator Animate() (iterator) | Coroutine that runs the rotators (and the colour, if no skill fills it) towards open or closed over animationDuration. |
private IEnumerator AnimateColorOnly(bool isLittingUp) (iterator) | Coroutine that fades only the colour up or down, used when closing a holder that was already closed. |
private void OnValidate() | Editor: fills rotators from child QuaternionRotationSlerp components if the list is empty. |
private void SetValue(bool isOpen) | Sets the open state and starts Animate if it changed. Does nothing visible on a headless server. |
Used in
Members of other types that take, return or hold a SkillOrbHolder: