//protected static void ValidateCurve(AnimationCurve curve, float value) //{ // if (curve.length < 2) // { // if (curve.length < 1) // curve.AddKey(0.0f, value); // else // curve.MoveKey(0, new Keyframe() { time = 0.0f, value = value }); // if (curve.length < 2) // curve.AddKey(0.1f, value); // else // curve.MoveKey(1, new Keyframe() { time = 0.1f, value = value }); // } //} public override void Delete(KeyView keyView) { ContinuousKeyView kv = keyView as ContinuousKeyView; if (kv != null) { if (_CurveKeyViews[kv.CurveIndex].Remove(kv)) { if (InspectorProperties.IsSelected(keyView)) { InspectorProperties.Select(null); } SetDirty(); Invalidate(); } } }
/// <summary> /// Delete SoundEvent /// </summary> /// <param name="soundEvent">SoundEvent to delete</param> public override void Delete(KeyView keyView) { EventOrientedKeyView ev = keyView as EventOrientedKeyView; if (ev != null) { if (_Events.Remove(ev)) { if (InspectorProperties.IsSelected(ev)) { InspectorProperties.Select(null); } this.Controls.Remove(keyView); RebuildTrackKeys(); } } }
/// <summary> /// Delete SoundEvent /// </summary> /// <param name="soundEvent">SoundEvent to delete</param> public override void Delete(KeyView keyView) { DiscreteKeyView dv = keyView as DiscreteKeyView; if (dv != null) { if (_Events.Remove(dv)) { this.Controls.Remove(dv); if (InspectorProperties.IsSelected(dv)) { InspectorProperties.Select(null); } RebuildTrackKeys(); } } }
public abstract void Delete(KeyView keyView);