A class in Root.Township, Alta.Impact.
Impact modifier asset that changes a stat's base value on the target or the wielder, based on the hit's damage, cripple damage or effectiveness.
Constructors
| Member | What it is |
|---|
ImpactModifierStatAffect() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private AnimationCurve addValueOverHitValue | Amount added to the stat, by hit value. |
private bool isAffectingWielder | When on, changes the wielding player's stat instead of the target's. |
private ImpactModifierStatAffect.HitValue isBasedOn | Which hit value drives the curves: damage, cripple damage or effectiveness. |
private AnimationCurve multiplyValueOverHitValue | Factor the stat's base is multiplied by, by hit value. |
private StatDefinition targetStat | The stat changed. |
Methods
| Member | What it is |
|---|
override void ModifyHit(ImpactHitWithTool hitWithTool) | Picks the hit value and applies it to the wielder's or the hit target's stats. |
1 private and internal method
| Member | What it is |
|---|
private void AffectStatManager(StatManager manager, float value) | Sets the stat's base to base times the multiply curve plus the add curve times ImpactModifierValueMultiplier. |