Skip to main content

BasicStats.GetValue

Declaration#

public virtual float GetValue(string formula, StatSource other)

Parameters#

NameDescription
formulaFormula used to get value
otherSource used when other: is requested

Description#

Get the value of a formula/expression.

Usage#

Example
using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(BasicStats source)    {        // Get the maximum value of a stat name 'HP' and add 3        float value = source.GetValue("HP:max + 3");    }
}