Interface IStatReader
- Namespace
- ElectricDrill.AstraRpgFramework.Stats
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Read-only interface for querying stat values from an entity.
Use TryGet(StatSO, out long) as the safe access path; Get requires Contains(T) to be checked first.
public interface IStatReader : IValueContainer<StatSO>
- Inherited Members
Methods
TryGet(StatSO, out long)
Tries to get the final value of a stat.
bool TryGet(StatSO stat, out long value)
Parameters
statStatSOThe stat to query.
valuelongThe final value if the stat is present; otherwise, 0.
Returns
- bool
trueif the stat is present; otherwise,false.
TryGetBase(StatSO, out long)
Tries to get the base value of a stat (before any modifiers are applied).
bool TryGetBase(StatSO stat, out long value)
Parameters
statStatSOThe stat to query.
valuelongThe base value if the stat is present; otherwise, 0.
Returns
- bool
trueif the stat is present; otherwise,false.