Skip to main content

FullnessStat

A class in Root.Township, Alta.StatSystem.

Threshold stat for food fullness. It ticks down by one at a rate that depends on the current hunger level.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private HungerStat hungerDefinitionThe hunger stat whose level sets the tick rate.
private int[] tickRatePerHungerThresholdStat updates per point of fullness lost, one entry per hunger level.

Methods​

MemberWhat it is
override void Applied(StatManager manager, Stat stat)Sets up the threshold levels and a stat update that removes 1 fullness after a number of updates picked by hunger level.
override bool CheckSerialize(float oldValue, float newValue)Only syncs when the whole number part of the value changes.