OnFullAffectTargetStatDefinition
A class in Root.Township, Alta.StatSystem.
Stat definition asset: when this stat fills up it changes another stat on the same manager, and it drains back down over time. The work is done by a FullEmptyUpdateModifier.
- Listed in Stats, effects, heat and liquid
- Inherits or implements
StatDefinition - Attributes
CreateAssetMenu
Constructors
| Member | What it is |
|---|---|
OnFullAffectTargetStatDefinition() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private StatDefinition affectedStatDefinition | The stat that gets changed while this one is full. |
private float builddownCooldown | Seconds after this stat last rose before it starts draining. |
private bool isContinuous | Apply the change every update while full instead of once. |
private bool isMultiplier | Multiply the affected stat's base instead of adding to it. |
private bool isRevertingOnEnd | For one-off changes, undo the change when this stat empties. |
private float modifierValue | The amount or factor applied to the affected stat. |
private float tickBuilddown | How much this stat drains per update once the cooldown has passed. |
Methods
| Member | What it is |
|---|---|
override void Applied(StatManager manager, Stat stat) | Creates and starts a FullEmptyUpdateModifier linking this stat to the affected stat, if the manager has it. |