Class StatSet
- Namespace
- ElectricDrill.AstraRpgFramework.Stats
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
A ScriptableObject that defines a collection of stats that can be used by entities. Implements IStatContainer to provide stat containment functionality.
public class StatSet : ScriptableObject, IValueContainer<Stat>
- Inheritance
-
objectStatSet
- Implements
Fields
_includedStatSets
[Obsolete("This field will be made private in a future release. Use public APIs instead.")]
[SerializeField]
public SerializableHashSet<StatSet> _includedStatSets
Field Value
Properties
Stats
Gets a read-only list of all stats in this set, including stats from included StatSets. Duplicates are automatically removed.
public IReadOnlyList<Stat> Stats { get; }
Property Value
- IReadOnlyList<Stat>
Methods
Contains(Stat)
Determines whether this stat set contains the specified stat. Also checks in included StatSets.
public virtual bool Contains(Stat stat)
Parameters
statStatThe stat to check for.
Returns
- bool
true if the stat set contains the stat; otherwise, false.
Contains(StatSet)
Determines whether this stat set contains another stat set. Either directly or indirectly.
public virtual bool Contains(StatSet statSet)
Parameters
statSetStatSetThe stat set to check for.
Returns
- bool
true if the
statSetis contained in this stat set; otherwise, false.
Get(Stat)
Gets the stat from this set that matches the specified stat. Also looks in included StatSets.
public Stat Get(Stat stat)
Parameters
statStatThe stat to find.
Returns
- Stat
The matching stat from this set.