Skip to content

Commit 571e914

Browse files
author
Baptiste SUZON
committed
feat: Can now change stats one by one
1 parent dc6f3ff commit 571e914

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Runtime/UtilitySystem.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ public void UpdateStats(Dictionary<string, float> inputs, bool allowPartialModif
4343
}
4444
}
4545

46+
public void SetStat(string key, float value)
47+
{
48+
if (_inputs.ContainsKey(key))
49+
{
50+
_inputs[key].Value = value;
51+
}
52+
else
53+
{
54+
Debug.Log("Couldn't find input " + key + " in given inputs");
55+
}
56+
}
57+
4658
public void Update()
4759
{
4860
foreach (var output in _outputs.Values)

0 commit comments

Comments
 (0)