void ToggleValueChanged(ChangeEvent <bool> evt) { if (evt.newValue == false) { curve = new NormalizedCurve(m_MaxPoints); } }
public SwitchableCurve(int id, int maxPoints, Toggle toggle) { m_MaxPoints = maxPoints; curve = new NormalizedCurve(m_MaxPoints); this.id = id; this.toggle = toggle; if (this.toggle != null) { toggle.RegisterValueChangedCallback(ToggleValueChanged); } }
public void ResetCurve() { curve = new NormalizedCurve(m_MaxPoints); }