public void ResetStat(StatType type, params StatModifierOption[] statOptions) { List <StatModifierOption> options = ConvertStatOptionsToList(statOptions); BaseStat targetStat = GetStat(type); if (targetStat == null) { Debug.Log("Stat: " + type + " not found"); return; } if (options.Contains(StatModifierOption.Cap)) { CappedStat capped = TryConvertToCappedStat(targetStat); if (capped != null) { capped.ResetCap(); OnStatChanged(type, null); } } if ((options.Count < 1 || options.Contains(StatModifierOption.Base))) { targetStat.Reset(); OnStatChanged(type, null); } }
public void ResetCap() { maxValue.Reset(); }