Ejemplo n.º 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);
        }
    }
Ejemplo n.º 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);
    }
Ejemplo n.º 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);
    }
Ejemplo n.º 4
0
 public void ModifyCap(float value, StatModifier.StatModificationType modType)
 {
     maxValue.ModifyStat(value, modType);
 }
Ejemplo n.º 5
0
    public void ApplyTrackedMod(Constants.BaseStatType statType, StatModifer mod)
    {
        BaseStat targetStat = GetStat(statType);

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

        targetStat.ModifyStat(value, modType);
    }