private float _GetValue(ref float _lastValue)
{
float v = (isModifierEnabled) ? ( _GetRawValue() ) * _GetBoostValue() : 0.0f;
if( negative ) {
v = -v;
}
if( limitValueMinMax ) {
v = Mathf.Clamp(v, valueMin, valueMax);
}
if( rest ) {
if(negative) {
v = Mathf.Min(_lastValue * restStrength, v);
} else {
v = Mathf.Max(_lastValue * restStrength, v);
}
}
_lastValue = v;
lastReturnedValue = v + valueBaseOffset;
return lastReturnedValue;
}