Class Class
- Namespace
- ElectricDrill.SoapRpgFramework.Classes
- Assembly
- com.electricdrill.soap-rpg-framework.Runtime.dll
Represents a character class in the RPG system. It can be used to define how attributes and stats grow over levels.
public class Class : ScriptableObject, IHasStatSet, IHasAttributeSet
- Inheritance
-
objectClass
- Implements
Fields
_attributeSet
The set of attributes associated with this class.
[SerializeField]
protected AttributeSet _attributeSet
Field Value
_maxHpGrowthFormula
The growth formula for the maximum HP. This is a baseline value that can be used to calculate the maximum HP of characters of this class at different levels.
[SerializeField]
protected GrowthFormula _maxHpGrowthFormula
Field Value
_statSet
The set of stats associated with this class.
[SerializeField]
protected StatSet _statSet
Field Value
Properties
AttributeSet
Gets the AttributeSet for this class.
public virtual AttributeSet AttributeSet { get; }
Property Value
StatSet
Gets the StatSet for this class.
public virtual StatSet StatSet { get; }
Property Value
Methods
GetAttributeAt(Attribute, int)
Calculates the value of a specific attribute at a given level.
public virtual long GetAttributeAt(Attribute attribute, int level)
Parameters
attributeAttributeThe attribute to calculate.
levelintThe level to calculate the attribute value for.
Returns
- long
The value of the attribute at the specified level.
GetMaxHpAt(int)
Calculates the maximum HP for a given level.
public long GetMaxHpAt(int level)
Parameters
levelintThe level to calculate the max HP for.
Returns
- long
The maximum HP at the specified level.
GetStatAt(Stat, int)
Calculates the value of a specific stat at a given level.
public virtual long GetStatAt(Stat stat, int level)
Parameters
statStatThe stat to calculate.
levelintThe level to calculate the stat value for.
Returns
- long
The value of the stat at the specified level.
Exceptions
- ArgumentException
Thrown when the growth formula for the stat is not set.