Struct StatChangeInfo
- Namespace
- ElectricDrill.AstraRpgFramework.Stats
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Contains information about a stat change event, including the entity, stat, and old/new values. Used for tracking and responding to stat modifications.
public struct StatChangeInfo : IHasValueChange<long>
- Implements
-
IHasValueChange<long>
Constructors
StatChangeInfo(EntityStats, Stat, long, long)
Initializes a new instance of the StatChangeInfo structure.
public StatChangeInfo(EntityStats entity, Stat stat, long previousValue, long newValue)
Parameters
entityEntityStatsThe EntityStats component that owns the stat.
statStatThe stat that was changed.
previousValuelongThe previous value of the stat.
newValuelongThe new value of the stat.
Fields
EntityStats
The EntityStats component that owns the changed stat.
public EntityStats EntityStats
Field Value
Stat
The stat that was changed.
public Stat Stat
Field Value
Properties
AbsAmount
The absolute amount of change between PreviousValue and NewValue.
public long AbsAmount { get; }
Property Value
- long
NewValue
The value of the stat after the change.
public readonly long NewValue { get; }
Property Value
- long
PreviousValue
The value of the stat before the change.
public readonly long PreviousValue { get; }
Property Value
- long