private void SetTopMostCurve(DoubleCurve doubleCurve)
{
int num;
if (this.m_CurveEditor.GetTopMostCurveID(out num))
{
for (int i = 0; i < this.m_AddedCurves.Count; i++)
{
CurveData data = this.m_AddedCurves[i];
if ((data.m_MaxId == num) || (data.m_MinId == num))
{
if (doubleCurve.signedRange == data.m_SignedRange)
{
if (data.m_MaxId > 0)
{
this.SetCurve(this.m_CurveEditor.GetCurveFromID(data.m_MaxId), doubleCurve.maxCurve);
}
if (data.m_MinId > 0)
{
this.SetCurve(this.m_CurveEditor.GetCurveFromID(data.m_MinId), doubleCurve.minCurve);
}
}
else
{
Debug.LogWarning("Cannot assign a curves with different signed range");
}
}
}
}
}