A class in Root.Township, Alta.StatSystem.
Stat definition for poison. While above 0, each stat update deals a small poison damage to another stat and then clears itself.
Constructors
| Member | What it is |
|---|
PoisonStat() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private readonly DamageData poisonDamage | Damage data with DamageSource.Poison, set as the change source on the hurt stat. |
private StatDefinition poisonedStatDefinition | The stat that takes the damage. |
private float tickDamage | Amount taken from the poisoned stat each update. |
Methods
| Member | What it is |
|---|
override void Applied(StatManager manager, Stat stat) | Starts the poison update while the value is above 0 and stops it at 0. |