public void ApplyTrackedMod(StatType type, StatModifier mod, GameObject cause, 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.ModifyCap(mod); OnStatChanged(type, cause); } } if ((options.Count < 1 || options.Contains(StatModifierOption.Base))) { targetStat.ModifyStat(mod); OnStatChanged(type, cause); } }
public void ApplyTrackedMod(BaseStatType statType, StatModifer mod) { BaseStat targetStat = GetStat(statType); if (targetStat == null) { Debug.Log("Stat: " + statType + " not found"); return; } targetStat.ModifyStat(mod); }
public void ApplyUntrackedMod(BaseStatType statType, float value, StatModificationType modType = StatModificationType.Additive) { BaseStat targetStat = GetStat(statType); if (targetStat == null) { Debug.Log("Stat: " + statType + " not found"); return; } targetStat.ModifyStat(value, modType); }
public void ModifyCap(float value, StatModifier.StatModificationType modType) { maxValue.ModifyStat(value, modType); }
public void ApplyTrackedMod(Constants.BaseStatType statType, StatModifer mod) { BaseStat targetStat = GetStat(statType); targetStat.ModifyStat(mod); }
public void ApplyUntrackedMod(Constants.BaseStatType statType, float value, Entity source, StatModificationType modType = StatModificationType.Additive) { BaseStat targetStat = GetStat(statType); targetStat.ModifyStat(value, modType); }