Exemplo n.º 1
0
        protected float GetValue(Easing easing, float origin, float target, float percent)
        {
            switch (_easing)
            {
            case Easing.EaseInBack:
                return(EasingFunction.EaseInBack(origin, target, percent));

            case Easing.EaseInBounce:
                return(EasingFunction.EaseInBounce(origin, target, percent));

            case Easing.EaseInCirc:
                return(EasingFunction.EaseInCirc(origin, target, percent));

            case Easing.EaseInCubic:
                return(EasingFunction.EaseInCubic(origin, target, percent));

            case Easing.EaseInElastic:
                return(EasingFunction.EaseInElastic(origin, target, percent));

            case Easing.EaseInExpo:
                return(EasingFunction.EaseInExpo(origin, target, percent));

            case Easing.EaseInOutBack:
                return(EasingFunction.EaseInOutBack(origin, target, percent));

            case Easing.EaseInOutBounce:
                return(EasingFunction.EaseInOutBounce(origin, target, percent));

            case Easing.EaseInOutCirc:
                return(EasingFunction.EaseInOutCirc(origin, target, percent));

            case Easing.EaseInOutCubic:
                return(EasingFunction.EaseInOutCubic(origin, target, percent));

            case Easing.EaseInOutElastic:
                return(EasingFunction.EaseInOutElastic(origin, target, percent));

            case Easing.EaseInOutExpo:
                return(EasingFunction.EaseInOutExpo(origin, target, percent));

            case Easing.EaseInOutQuad:
                return(EasingFunction.EaseInOutQuad(origin, target, percent));

            case Easing.EaseInOutQuart:
                return(EasingFunction.EaseInOutQuart(origin, target, percent));

            case Easing.EaseInOutQuint:
                return(EasingFunction.EaseInOutQuint(origin, target, percent));

            case Easing.EaseInOutSine:
                return(EasingFunction.EaseInOutSine(origin, target, percent));

            case Easing.EaseInQuad:
                return(EasingFunction.EaseInQuad(origin, target, percent));

            case Easing.EaseInQuart:
                return(EasingFunction.EaseInQuart(origin, target, percent));

            case Easing.EaseInQuint:
                return(EasingFunction.EaseInQuint(origin, target, percent));

            case Easing.EaseInSine:
                return(EasingFunction.EaseInSine(origin, target, percent));

            case Easing.EaseOutBack:
                return(EasingFunction.EaseOutBack(origin, target, percent));

            case Easing.EaseOutBounce:
                return(EasingFunction.EaseOutBounce(origin, target, percent));

            case Easing.EaseOutCirc:
                return(EasingFunction.EaseOutCirc(origin, target, percent));

            case Easing.EaseOutCubic:
                return(EasingFunction.EaseOutCubic(origin, target, percent));

            case Easing.EaseOutElastic:
                return(EasingFunction.EaseOutElastic(origin, target, percent));

            case Easing.EaseOutExpo:
                return(EasingFunction.EaseOutExpo(origin, target, percent));

            case Easing.EaseOutQuad:
                return(EasingFunction.EaseOutQuad(origin, target, percent));

            case Easing.EaseOutQuart:
                return(EasingFunction.EaseOutQuart(origin, target, percent));

            case Easing.EaseOutQuint:
                return(EasingFunction.EaseOutQuint(origin, target, percent));

            case Easing.EaseOutSine:
                return(EasingFunction.EaseOutSine(origin, target, percent));

            case Easing.Linear:
                return(EasingFunction.Linear(origin, target, percent));

            case Easing.Spring:
                return(EasingFunction.Spring(origin, target, percent));
            }

            throw new NotSupportedException();
        }