namespace StatHub;
[GlobalClass, Icon("res://addons/StatHub/Assets/Stat.png")]
public abstract partial class Stat : Node
A stat provides a base value and returns a modified value based on any attached modifiers.
There are two base implementations of Stat
in the plugin:
ModifiersChanged
[Signal]
public delegate void ModifiersChangedEventHandler();
Emitted when this stat’s list of modifiers is changed.
ValueDirtied
[Signal]
public delegate void ValueDirtiedEventHandler();
Emitted when the stat’s value is out-of-date.
ValueUpdated
[Signal]
public delegate void ValueUpdatedEventHandler();
Emitted when the stat’s value is recalculated.
ValueUpdateOptions
public enum ValueUpdateOptions
{
ON_REQUEST_VALUE = 0,
ON_DIRTIED,
ON_PROCESS,
ON_PHYSICS_PROCESS,
MANUAL,
}
Defines methods of updating the stat’s value.
ON_REQUEST_VALUE
: The value attempts to update once it's requested.