Skip to main content

LocomotionStatSettings

A class in Root.Township, the global namespace.

Asset with the stats that affect player movement speed. Used by LocomotionController.

Constructors​

MemberWhat it is
LocomotionStatSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private StatDefinition crippleStatBacking field for CrippleStat.
private AnimationCurve crippleValueToSpeedModifierCurve from the cripple stat's fraction (0 to 1) to a speed modifier.
private StatDefinition speedStatBacking field for SpeedStat.

Properties​

MemberWhat it is
StatDefinition CrippleStat { get; }The stat that slows the player as it changes.
StatDefinition SpeedStat { get; }The movement speed stat.

Methods​

MemberWhat it is
float GetCrippleValue(Stat stat)Returns the speed modifier for a stat, from a curve over its value divided by its maximum.

Used in​

Members of other types that take, return or hold a LocomotionStatSettings: