Exemplo n.º 1
0
        public double GetProgress(int index)
        {
            if (!(index < GetAnimationCount()))
            {
                throw new IndexOutOfRangeException("Invalid animation index");
            }

            switch (AnimationType)
            {
            case AnimationType.Linear:
                return(AnimationLinear.CalculateProgress(animationProgresses[index]));

            case AnimationType.EaseInOut:
                return(AnimationEaseInOut.CalculateProgress(animationProgresses[index]));

            case AnimationType.EaseOut:
                return(AnimationEaseOut.CalculateProgress(animationProgresses[index]));

            case AnimationType.CustomQuadratic:
                return(AnimationCustomQuadratic.CalculateProgress(animationProgresses[index]));

            default:
                throw new NotImplementedException("The given AnimationType is not implemented");
            }
        }
Exemplo n.º 2
0
        public double GetProgress()
        {
            switch (AnimationType)
            {
            case AnimationType.Linear:
                return(AnimationLinear.CalculateProgress(progress));

            case AnimationType.EaseInOut:
                return(AnimationEaseInOut.CalculateProgress(progress));
            }

            throw new NotImplementedException("The given AnimationType is not implemented");
        }
Exemplo n.º 3
0
 public static double CalculateProgress(double progress)
 {
     return(AnimationEaseInOut.EaseInOut(progress));
 }