Class Skill
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
Base class for every skill — a plain C# object, one instance per character, created with new.
Unity never sees it: the type name is the identity and the design values live in content data.
Lifecycle (driven by SkillUserBehaviour): AddSkill -> OnAdded() Update -> Tick(dt) (cooldowns; buffs also count their duration down here) Remove -> OnRemoved() UseSkill -> Use() coroutine, hosted on the SkillUserBehaviour MonoBehaviour
Partial because the OneJS source generator only processes partial classes — the generated
Level property and OnLevelChanged event are what the UI binds to.
public abstract class Skill
- Inheritance
-
objectSkill
- Derived
Fields
- Finished
Event fired when an active skill finishes its coroutine.
Properties
- DisplayName
Human-readable name for tooltips and book titles. Derived from the type name (
GoldBonusBuffreads as "Gold Bonus Buff") unless a skill overrides it.
- Level
Reactive view of
_level; raisesOnLevelChangedwhen the value actually changes.
- TypeName
Stable identity of the skill: the type name. A prefab address used to serve this role, but the prefabs are gone — saves, drop tables and the loot generator all key on the type now.
- name
Machine name of the skill — the class name, matching the old MonoBehaviour name.
Methods
- BuildTooltipDescription()
Rich-text tooltip block: command quote, description and unmet requirements.
- CanUse()
Can this skill be used right now? Buffs and passives override this away.
- ShowTooltip(ShowTooltip, GameObject)
Fills the skill tooltip UI. Same content as the old MonoBehaviour version, but a plain skill has no GameObject of its own — the caller passes the tooltip object.