Skip to main content

BurnStat

A class in Root.Township, Alta.StatSystem.

Stat definition for being on fire. Above the ignite threshold it drains the health stat every stat update, and the burn value falls by itself over time.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private AnimationCurve damageByValueHealth lost per stat update for a given burn value.
private float igniteThresholdBacking field for IgniteThreshold.
private float putOutSpeedBurn value removed every stat update while above 0.

Properties​

MemberWhat it is
float IgniteThreshold { get; }Burn value above which the target starts taking damage.

Methods​

MemberWhat it is
override void Applied(StatManager manager, Stat stat)Hooks the stat up: starts the health drain above igniteThreshold, stops it at 0, and lowers the burn by putOutSpeed each update.