Skip to main content

CrippleStatDefinition

A class in Root.Township, the global namespace.

Stat definition for cripple-style stats that move back by a fixed amount every stat manager update.

Constructors​

MemberWhat it is
CrippleStatDefinition()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

2 private and internal fields
MemberWhat it is
private bool isBuildupIf true, the stat drains by regenPerTick each update instead of filling.
private float regenPerTickAmount added to (or taken from) the stat's base each update. Defaults to 0.01.

Methods​

MemberWhat it is
override void Applied(StatManager manager, Stat stat)Hooks the manager's update to regen the stat up to its maximum, or with isBuildup to drain it.

Used in​

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