PlayerEffectManager.StatEffectApplication
A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Private helper in PlayerEffectManager that watches one stat for a buff or a debuff and shows or hides the matching shield shell effect. Two are made per stat effect (buff and debuff).
- Listed in Global namespace: P
- Nested in
PlayerEffectManager
Constructors
| Member | What it is |
|---|---|
StatEffectApplication(StatDrivenEffect statDrive, Stat stat, bool isBuff, StatEffectShellAnimator shellAnimator, Action<StatDefinition, bool, bool> activeChanged, Action<StatDefinition, bool, float> sizeChanged) | Creates a PlayerEffectManager.StatEffectApplication from statDrive, stat, isBuff, shellAnimator, activeChanged and sizeChanged. |
Fields
| Member | What it is |
|---|---|
Action<StatDefinition, bool, bool> ActiveChanged | Callback run when the buff or debuff turns on or off, with the stat definition and whether it is a buff. |
Action<StatDefinition, bool, float> SizeChanged | Callback run with a new effect size (from the stat drive's value-to-size curve) when the effect starts or its value changes. |
7 private and internal fields
| Member | What it is |
|---|---|
private ShellAnimationHandler handler | Animation handler of the shield shell currently playing, deactivated when the effect ends or restarts. |
private bool isActive | Whether the buff or debuff is currently showing. |
private bool isBuff | True to watch for a raised stat, false to watch for a lowered one. |
private Func<float, float, float> MagnitudeDefinition | Unused function field. |
private StatEffectShellAnimator shellAnimator | The player's StatEffectShellAnimator that plays the shield effect. |
private StatDrivenEffect statDrive | The StatDrivenEffect that gives the shield effect and the value-to-size curve. |
private float Value | Last buff amount the shell was sized for. A change over 0.01 restarts the shell animation. |
Methods
1 private and internal method
| Member | What it is |
|---|---|
private void ValueChanged(Stat stat) | Handles the stat's Changed event: works out the buff part of the value and turns the shell on, off or resizes it. |