IndirectStatModifierDefinition
A class in Root.Township, Alta.StatSystem.
Effect asset that applies an indirect (over time) modifier to a stat, with a curve over its duration. Strength can scale the value, the duration or both.
Constructors
| Member | What it is |
|---|
IndirectStatModifierDefinition() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private float baseValue | Modifier value before strength. |
private Curve curveOverDuration | How the effect is spread over the duration. |
private uint duration | Seconds the modifier lasts before strength. |
private IndirectStatModifierDefinition.StrengthUsage strengthAffects | Flags for whether strength scales the duration, the value or both. |
private StatDefinition targetStat | Backing field for TargetStat. |
Properties
| Member | What it is |
|---|
StatDefinition TargetStat { get; } | The stat the modifier changes. |
Methods
| Member | What it is |
|---|
protected override void Apply(EffectHandler target, float strength) | Applies an IndirectModifier to the target's stat, scaling value and duration by strength as strengthAffects says. |