Table of Contents

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

stat StatSO

The stat to query.

value long

The final value if the stat is present; otherwise, 0.

Returns

bool

true if 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

stat StatSO

The stat to query.

value long

The base value if the stat is present; otherwise, 0.

Returns

bool

true if the stat is present; otherwise, false.