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