Beispiel #1
0
    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);
        }
    }
Beispiel #2
0
    public void ApplyTrackedMod(BaseStatType statType, StatModifer mod)
    {
        BaseStat targetStat = GetStat(statType);

        if (targetStat == null)
        {
            Debug.Log("Stat: " + statType + " not found");
            return;
        }
        targetStat.ModifyStat(mod);
    }
Beispiel #3
0
    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);
    }
Beispiel #4
0
 public void ModifyCap(float value, StatModifier.StatModificationType modType)
 {
     maxValue.ModifyStat(value, modType);
 }
Beispiel #5
0
    public void ApplyTrackedMod(Constants.BaseStatType statType, StatModifer mod)
    {
        BaseStat targetStat = GetStat(statType);

        targetStat.ModifyStat(mod);
    }
Beispiel #6
0
    public void ApplyUntrackedMod(Constants.BaseStatType statType, float value, Entity source, StatModificationType modType = StatModificationType.Additive)
    {
        BaseStat targetStat = GetStat(statType);

        targetStat.ModifyStat(value, modType);
    }