private static GetUnsignedDoubleCurveDefaults ( ) : List |
||
Résultat | List |
private void AddDefaultPresetsToLibrary(PresetLibrary presetLibrary) { DoubleCurvePresetLibrary doubleCurvePresetLibrary = presetLibrary as DoubleCurvePresetLibrary; if (doubleCurvePresetLibrary == null) { Debug.Log("Incorrect preset library, should be a DoubleCurvePresetLibrary but was a " + presetLibrary.GetType()); return; } bool signedRange = this.m_DoubleCurve.signedRange; List <DoubleCurve> list = new List <DoubleCurve>(); if (this.IsSingleCurve(this.m_DoubleCurve)) { list = DoubleCurvePresetsContentsForPopupWindow.GetUnsignedSingleCurveDefaults(signedRange); } else { if (signedRange) { list = DoubleCurvePresetsContentsForPopupWindow.GetSignedDoubleCurveDefaults(); } else { list = DoubleCurvePresetsContentsForPopupWindow.GetUnsignedDoubleCurveDefaults(); } } foreach (DoubleCurve current in list) { doubleCurvePresetLibrary.Add(current, string.Empty); } }
private void AddDefaultPresetsToLibrary(PresetLibrary presetLibrary) { DoubleCurvePresetLibrary curvePresetLibrary = presetLibrary as DoubleCurvePresetLibrary; if ((UnityEngine.Object)curvePresetLibrary == (UnityEngine.Object)null) { Debug.Log((object)("Incorrect preset library, should be a DoubleCurvePresetLibrary but was a " + (object)presetLibrary.GetType())); } else { bool signedRange = this.m_DoubleCurve.signedRange; List <DoubleCurve> doubleCurveList = new List <DoubleCurve>(); using (List <DoubleCurve> .Enumerator enumerator = (!this.IsSingleCurve(this.m_DoubleCurve) ? (!signedRange ? DoubleCurvePresetsContentsForPopupWindow.GetUnsignedDoubleCurveDefaults() : DoubleCurvePresetsContentsForPopupWindow.GetSignedDoubleCurveDefaults()) : DoubleCurvePresetsContentsForPopupWindow.GetUnsignedSingleCurveDefaults(signedRange)).GetEnumerator()) { while (enumerator.MoveNext()) { DoubleCurve current = enumerator.Current; curvePresetLibrary.Add((object)current, string.Empty); } } } }