public StatModification(float value, StatModificationType type, int order, object source)
 {
     Value  = value;
     Type   = type;
     Order  = order;
     Source = source;
 }
Ejemplo n.º 2
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.º 3
0
    public float GetValueByModType(StatModificationType type)
    {
        //Debug.Log("getting a value for type " + type);

        //if (ModType == StatModificationType.Multiplicative)
        //    Debug.Log(Value + " is a muli mod value");

        //if (ModType == StatModificationType.Additive)
        //    Debug.Log(Value + " is an add mod value");

        return(type == ModType ? Value : 0f);
    }
Ejemplo n.º 4
0
        public void ModifyStat(float value, StatModificationType modType = StatModificationType.Additive)
        {
            mods.Add(new StatModifer(value, modType));

            //switch (modType) {
            //    case StatModificationType.Additive:
            //        //CurrentValue += value;
            //        mods.Add(new StatModifer(value, StatModificationType.Additive));

            //        break;

            //    case StatModificationType.Multiplicative:
            //        //CurrentValue *= value;
            //        mods.Add(new StatModifer(value, StatModificationType.Multiplicative));
            //        break;
            //}

            //if (BaseValue > MaxValue) {
            //    BaseValue = MaxValue;
            //}

            //if (BaseValue <= 0f)
            //    BaseValue = 0f;
        }
Ejemplo n.º 5
0
 public StatModifer(float value, StatModificationType modType)
 {
     this.value   = value;
     this.modType = modType;
 }
Ejemplo n.º 6
0
 public void ModifyStat(float value, StatModificationType modType = StatModificationType.Additive)
 {
     mods.Add(new StatModifer(value, modType));
 }
Ejemplo n.º 7
0
    public void ApplyUntrackedMod(Constants.BaseStatType statType, float value, Entity source, StatModificationType modType = StatModificationType.Additive)
    {
        BaseStat targetStat = GetStat(statType);

        targetStat.ModifyStat(value, modType);
    }
Ejemplo n.º 8
0
 public StatModifier(StatModificationType statModificationType, T modificationValue)
 {
     this.statModificationType = statModificationType;
     this.modificationValue    = modificationValue;
 }
Ejemplo n.º 9
0
 public float GetValueByModType(StatModificationType type)
 {
     return(type == ModType ? Value : 0f);
 }
Ejemplo n.º 10
0
 public StatModifier(float value, StatModificationType modType)
 {
     this.Value   = value;
     this.ModType = ModType;
 }
Ejemplo n.º 11
0
 public StatModifier(StatModificationPhase phase, StatModificationType type, IReadOnlyEventField <float> currentValue)
 {
     Phase        = phase;
     Type         = type;
     CurrentValue = currentValue ?? throw new ArgumentNullException(nameof(currentValue));
 }
 public StatModification(float value, StatModificationType type, object source) : this(value, type, (int)type, source)
 {
 }
 public StatModification(float value, StatModificationType type, int order) : this(value, type, order, null)
 {
 }
 public StatModification(float value, StatModificationType type) : this(value, type, (int)type, null)
 {
 }