GetEaseInOutKeys() static private méthode

static private GetEaseInOutKeys ( ) : UnityEngine.Keyframe[]
Résultat UnityEngine.Keyframe[]
 private static List <DoubleCurve> GetUnsignedSingleCurveDefaults(bool signedRange) =>
 new List <DoubleCurve>
 {
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetLinearKeys()), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetLinearMirrorKeys()), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInKeys()), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInMirrorKeys()), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseOutMirrorKeys()), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys()), signedRange),
     new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInOutMirrorKeys()), signedRange)
 };
        static List <DoubleCurve> GetUnsignedSingleCurveDefaults(bool signedRange)
        {
            List <DoubleCurve> defaults = new List <DoubleCurve>();

            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetLinearKeys()), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetLinearMirrorKeys()), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInKeys()), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInMirrorKeys()), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseOutMirrorKeys()), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys()), signedRange));
            defaults.Add(new DoubleCurve(null, new AnimationCurve(CurveEditorWindow.GetEaseInOutMirrorKeys()), signedRange));
            return(defaults);
        }
Exemple #3
0
        private void AddDefaultPresetsToLibrary(PresetLibrary presetLibrary)
        {
            CurvePresetLibrary curvePresetLibrary = presetLibrary as CurvePresetLibrary;

            if (curvePresetLibrary == null)
            {
                Debug.Log("Incorrect preset library, should be a CurvePresetLibrary but was a " + presetLibrary.GetType());
                return;
            }
            foreach (AnimationCurve current in new List <AnimationCurve>
            {
                new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)),
                new AnimationCurve(CurveEditorWindow.GetLinearKeys()),
                new AnimationCurve(CurveEditorWindow.GetEaseInKeys()),
                new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()),
                new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys())
            })
            {
                curvePresetLibrary.Add(current, string.Empty);
            }
        }
        void AddDefaultPresetsToLibrary(PresetLibrary presetLibrary)
        {
            CurvePresetLibrary curveDefaultLib = presetLibrary as CurvePresetLibrary;

            if (curveDefaultLib == null)
            {
                Debug.Log("Incorrect preset library, should be a CurvePresetLibrary but was a " + presetLibrary.GetType());
                return;
            }

            List <AnimationCurve> defaults = new List <AnimationCurve>();

            defaults.Add(new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)));
            defaults.Add(new AnimationCurve(CurveEditorWindow.GetLinearKeys()));
            defaults.Add(new AnimationCurve(CurveEditorWindow.GetEaseInKeys()));
            defaults.Add(new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()));
            defaults.Add(new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys()));

            foreach (AnimationCurve preset in defaults)
            {
                curveDefaultLib.Add(preset, "");
            }
        }
Exemple #5
0
        private void AddDefaultPresetsToLibrary(PresetLibrary presetLibrary)
        {
            CurvePresetLibrary library = presetLibrary as CurvePresetLibrary;

            if (library == null)
            {
                Debug.Log("Incorrect preset library, should be a CurvePresetLibrary but was a " + presetLibrary.GetType());
            }
            else
            {
                List <AnimationCurve> list = new List <AnimationCurve> {
                    new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)),
                    new AnimationCurve(CurveEditorWindow.GetLinearKeys()),
                    new AnimationCurve(CurveEditorWindow.GetEaseInKeys()),
                    new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()),
                    new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys())
                };
                foreach (AnimationCurve curve in list)
                {
                    library.Add(curve, "");
                }
            }
        }
        private void AddDefaultPresetsToLibrary(PresetLibrary presetLibrary)
        {
            CurvePresetLibrary curvePresetLibrary = presetLibrary as CurvePresetLibrary;

            if ((UnityEngine.Object)curvePresetLibrary == (UnityEngine.Object)null)
            {
                Debug.Log((object)("Incorrect preset library, should be a CurvePresetLibrary but was a " + (object)presetLibrary.GetType()));
            }
            else
            {
                using (List <AnimationCurve> .Enumerator enumerator = new List <AnimationCurve>()
                {
                    new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)), new AnimationCurve(CurveEditorWindow.GetLinearKeys()), new AnimationCurve(CurveEditorWindow.GetEaseInKeys()), new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()), new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys())
                }.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        AnimationCurve current = enumerator.Current;
                        curvePresetLibrary.Add((object)current, string.Empty);
                    }
                }
            }
        }