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"); } }
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"); }