Esempio n. 1
0
        //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();
                }
            }
        }
Esempio n. 2
0
        /// <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();
                }
            }
        }
Esempio n. 3
0
        /// <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();
                }
            }
        }
Esempio n. 4
0
 public abstract void Delete(KeyView keyView);