public StatModification(float value, StatModificationType type, int order, object source) { Value = value; Type = type; Order = order; Source = source; }
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 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); }
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; }
public StatModifer(float value, StatModificationType modType) { this.value = value; this.modType = modType; }
public void ModifyStat(float value, StatModificationType modType = StatModificationType.Additive) { mods.Add(new StatModifer(value, modType)); }
public void ApplyUntrackedMod(Constants.BaseStatType statType, float value, Entity source, StatModificationType modType = StatModificationType.Additive) { BaseStat targetStat = GetStat(statType); targetStat.ModifyStat(value, modType); }
public StatModifier(StatModificationType statModificationType, T modificationValue) { this.statModificationType = statModificationType; this.modificationValue = modificationValue; }
public float GetValueByModType(StatModificationType type) { return(type == ModType ? Value : 0f); }
public StatModifier(float value, StatModificationType modType) { this.Value = value; this.ModType = ModType; }
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) { }