コード例 #1
0
        // FIXME: CanBeAppliedToThing restriction for burst damage and thrown weapons

        public override void ModifyVerbProperty(ThingWithComps parentThing, VerbProperties verbProperties)
        {
            float val = ConvertHelper.Convert <float>(fieldInfo.GetValue(verbProperties));

            val = valueModifier.ChangeValue(val);
            SetVerbProperty(verbProperties, ConvertHelper.Convert(val, fieldType));
        }
コード例 #2
0
        public float ChangeValue(float oldVal)
        {
            float newVal = valueModifier.ChangeValue(oldVal);

            // Just in case we're exceeding normal StatDef bounds
            if (affectedStat.postProcessCurve == null)
            {
                newVal = Mathf.Clamp(newVal, affectedStat.minValue, affectedStat.maxValue);
            }

            return(newVal);
        }