Table of Contents

Class StatSet

Namespace
ElectricDrill.SoapRpgFramework.Stats
Assembly
com.electricdrill.soap-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
object
StatSet
Implements

Fields

_includedStatSets

[SerializeField]
public SerializableHashSet<StatSet> _includedStatSets

Field Value

SerializableHashSet<StatSet>

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

stat Stat

The 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

statSet StatSet

The stat set to check for.

Returns

bool

true if the statSet is 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

stat Stat

The stat to find.

Returns

Stat

The matching stat from this set.