Stat Scaling Source
π StatScalingSource Struct
The StatScalingSource struct is used by a Stat as the source to scale itself. It essentially works as the scaling settings.
Namespace:
Esper.Inventool.StatsAccess:publicType:structAttributes:[Serializable]
π¦ Fields
public
scalingType
ScalingSource.ScalingType
The scaling mode used (None, Linear, Curve).
public
initialValue
StatValue
The starting value.
public
increment
StatValue
The scaling amount used for linear scaling.
public
min
StatValue
The minimum value used for curve scaling.
public
max
StatValue
The maximum value used for curve scaling.
public
curve
AnimationCurve
The curve used when scaling type is Curve.
π§° Constructors
public
StatScalingSource(StatValue initialValue)
Creates a scaling source with no scaling.
public
StatScalingSource(StatValue initialValue, StatValue increment)
Creates a scaling source with linear scaling.
public
StatScalingSource(StatValue initialValue, StatValue min, StatValue max, AnimationCurve curve)
Creates a scaling source with curve scaling.
π§° Methods
public
SetIdentity(StatIdentity identity)
void
Sets the identity for all values (initialValue, increment, min, max).
public
GetScaledValue(int level, int maxLevel)
StatValue
Gets the scaled value at a specific level.
Create a Scaling Source
Set Identity
The SetIdentity method can be used to set the Stat Identity of the stat values.
Get Scaled Value
You can get the scaled value at a certain level with the GetScaledValue method. This requires 2 integers: the current level and the max level.
Last updated