Ejemplo n.º 1
0
        public static Func <float, float> GetEaseFunction(EaseFunction functionType, EaseType easeType)
        {
            switch (functionType)
            {
            case EaseFunction.Linear:
                return(Linear);

            case EaseFunction.Quad:
                return(Quad.Get(easeType));

            case EaseFunction.Cubic:
                return(Cubic.Get(easeType));

            case EaseFunction.Quartic:
                return(Quartic.Get(easeType));

            case EaseFunction.Quintic:
                return(Quintic.Get(easeType));

            case EaseFunction.Sin:
                return(Sin.Get(easeType));

            case EaseFunction.Exponential:
                return(Exponential.Get(easeType));

            case EaseFunction.Circular:
                return(Circular.Get(easeType));

            case EaseFunction.Bounce:
                return(Bounce.Get(easeType));

            case EaseFunction.Elastic:
                return(Elastic.Get(easeType));

            case EaseFunction.Back:
                return(Back.Get(easeType));
            }
            return(f => f);
        }