private void InitDoubleScalars(MinMaxCurveState oldState)
{
this.minConstant = this.GetAverageKeyValue(this.minCurve.animationCurveValue.keys) * this.scalar.floatValue;
switch (oldState)
{
case MinMaxCurveState.k_Scalar:
this.maxConstant = this.scalar.floatValue;
break;
case MinMaxCurveState.k_Curve:
case MinMaxCurveState.k_TwoCurves:
this.maxConstant = this.GetAverageKeyValue(this.maxCurve.animationCurveValue.keys) * this.scalar.floatValue;
break;
default:
Debug.LogError("Enum not handled!");
break;
}
this.SetCurveRequirements();
}