ChairmanAbility (Base)
Overview
Abstract base class for all abilities. Handles shared cooldown UI, gating via IsValid(), and exposes the abstract hooks ApplyEffect(), AbilityDescription(), and AbilityTitle().
Serialized Fields
- IntVariable
sharedAbilityCooldown— global cooldown counter shared by all abilities. - IntVariable
lastAbilityCooldown— last cooldown duration; used to lerp the fill. - int
abilityCooldown(default60) — per-ability cooldown length. - Transform
cooldownGraphic— its local Y is lerped from-130(just used) to0(ready). - LeanButton
abilityButton— interactable only when not cooling down andIsValid()returnstrue.
Behaviour
- On tick,
UpdateUI():- If
sharedAbilityCooldown != 0, movescooldownGraphicvertically and disables the button. - Otherwise, enables the button when
IsValid()istrue.
- If
Methods for Implementors
public abstract void ApplyEffect();
public abstract string AbilityDescription();
public abstract string AbilityTitle();
protected virtual bool IsValid() => true;
Integration Notes
- Wire
sharedAbilityCooldown,lastAbilityCooldown,cooldownGraphic, andabilityButtonin the ability prefab. - Cooldown visuals assume a vertical fill effect via
cooldownGraphictranslation.