GDTKItem.GetStatValue
Declaration#
public float GetStatValue(string id)Parameters#
| Name | Description |
|---|---|
| id | Id of the stat to get |
Description#
Get the value of a stat by id
Usage#
using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(GDTKItem target, string statId) { float result = target.GetStatValue(statId); }
}Declaration#
public float GetStatValue(string id, Inventory inventory)Parameters#
| Name | Description |
|---|---|
| id | Id of the stat to get |
| inventory | Inventory requesting value |
Description#
Get the value of a stat by id
Usage#
Example
using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
public void Example(GDTKItem target, string id) { float result = target.GetStatValue(id); }
}