Skip to main content

ControlledStat

An abstract class in Root.Township, Alta.StatSystem.

Base for a stat that cancels out against another stat: whenever it changes, both lose the smaller of the two values.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private StatDefinition controlledDefinitionThe opposing stat this one cancels against.

Methods​

MemberWhat it is
override void Applied(StatManager manager, Stat stat)Binds the stat so any change subtracts the smaller of this and the controlled stat's value from both.