Example #1
0
        public float SumPercentageFactorAndValue(float value)
        {
            if (Unit != EntityStatUnit.Percentage)
            {
                throw new Exception("Unit != EntityStatUnit.Percentage " + this);
            }

            //float val = GetValueToCalcPercentage(useCurrentValue);
            return(FactorCalculator.AddFactor(value, this.Factor));
        }
Example #2
0
        public float SumValueAndPercentageFactor(float factorPercentage, bool useCurrentValue)
        {
            if (Unit != EntityStatUnit.Absolute)
            {
                throw new Exception("Unit != EntityStatUnit.Absolute " + this);
            }

            float val = GetValueToCalcPercentage(useCurrentValue);

            return(FactorCalculator.AddFactor(val, factorPercentage));
        }