Table of Contents

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

attribute AttributeSO

The attribute to query.

value long

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

Returns

bool

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

attribute AttributeSO

The attribute to query.

value long

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

Returns

bool

true if the attribute is present; otherwise, false.