A class in Root.Township, Alta.StatSystem.
Stat definition that changes by a fixed amount per second on the manager's incremental tick, while its value is above 0.
Constructors
| Member | What it is |
|---|
IncrementingStat() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private bool isIncrementing | Backing field for IsIncrementing. |
private float statChangePerSecond | Change per second. Negative values drain the stat. |
private float statChangePerTick | statChangePerSecond times the manager's incremental tick time. |
Properties
| Member | What it is |
|---|
bool IsIncrementing { get; } | True when the change per second is negative, so the name reads backwards. |
Methods
| Member | What it is |
|---|
override void Applied(StatManager manager, Stat stat) | Works out the per tick change and adds it on each incremental update while the value is above 0. |