Esempio n. 1
0
    public void RemoveTrackedMod(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.RemoveCapModifier(mod);
                OnStatChanged(type, cause);
            }
        }

        if ((options.Count < 1 || options.Contains(StatModifierOption.Base)))
        {
            targetStat.RemoveModifier(mod);
            OnStatChanged(type, cause);
        }
    }
Esempio n. 2
0
    public void RemoveTrackedMod(BaseStatType statType, StatModifer mod)
    {
        BaseStat targetStat = GetStat(statType);

        if (targetStat == null)
        {
            Debug.Log("Stat: " + statType + " not found");
            return;
        }
        targetStat.RemoveModifier(mod);
    }
Esempio n. 3
0
 public void RemoveCapModifier(StatModifier mod)
 {
     maxValue.RemoveModifier(mod);
 }
Esempio n. 4
0
 public void RemoveModifier(string modName)
 {
     StatObject.RemoveModifier(modName);
 }
Esempio n. 5
0
    public void RemoveTrackedMod(Constants.BaseStatType statType, StatModifer mod)
    {
        BaseStat targetStat = GetStat(statType);

        targetStat.RemoveModifier(mod);
    }