A class in Root.Township, Alta.StatSystem.
Combines timed IndirectModifiers on one stat into a single StatModifier, by summing their values and passing the sum through the stat's indirect modification curve. Owned by a StatManager; saved with it.
Constructors
Fields
6 private and internal fields
| Member | What it is |
|---|
private StatModifier appliedModifier | The single stat modifier applied for the combined value, or null. |
private static Logger logger | NLog logger for this class. |
private StatManager manager | The stat manager that owns the stat. |
private Stat targetStat | The stat being changed. |
private HashSet<IndirectModifier> trackedModifiers | The indirect modifiers in effect. |
private float value | Sum of the tracked modifiers' values, before the curve. |
Events
1 private and internal event
| Member | What it is |
|---|
private event Action Updated | Private event that calls each tracked modifier's Update. |
Methods
5 private and internal methods
| Member | What it is |
|---|
private void Changed() | Updates or creates the applied modifier from the curve when there are tracked modifiers, or removes it when there are none. |
private void ChangedModifier(IndirectModifier modifier) | Adds a tracked modifier's change in value to the sum. |
private void Clean(StatManager manager) | On stat manager reset, drops all tracked modifiers and removes the applied one. |
private void FinishedModifier(IndirectModifier modifier) | Removes a finished modifier and its value from the sum. |
private void Update(StatManager manager) | On each stat manager update, updates every tracked modifier. |
Used in
Members of other types that take, return or hold a IndirectStatModifier: