public static void Apply(CapacityInfoModifier modifier, ref CapacityInfo capacityInfo) { if (modifier.Multiplicative) { capacityInfo *= modifier.CapacityInfo; } else { capacityInfo += modifier.CapacityInfo; } }
public override void Awake() { base.Awake(); CapacitiesModifiers = new List <CapacityInfoModifier>(); CapacitiesDirty = false; CapacityInfoBase = new CapacityInfo(1f); CapacityInfoBase.SetCapacity(ECapacityType.Pain, 0f); capacityInfoCurrent = this.CapacityInfoBase.Clone(); _eventGenerator = new CapacitiesEventGenerator(this); }