public static Func <double, double> GetLerpFunction(AnimationFunctionType animationFunctionType)
        {
            switch (animationFunctionType)
            {
            case AnimationFunctionType.SLOW_OUT:
                return(Lerp_SinSlowOut);

            case AnimationFunctionType.FAST_IN_SLOW_OUT:
                return(Lerp_SqrtFastInSlowOut);

            case AnimationFunctionType.SLOW_IN_OUT:
                return(Lerp_ExpSlowInOut);

            default:
                throw new OSAException("AnimationFunctionType not handled: " + animationFunctionType);
            }
        }
Exemplo n.º 2
0
 public ExpandCollapseAnimationState(bool useUnscaledTime, AnimationFunctionType animationFunctionType = AnimationFunctionType.SLOW_OUT)
 {
     _UseUnscaledTime = useUnscaledTime;
     _Fn = OSAMath.GetLerpFunction(animationFunctionType);
     expandingStartTime = Time;
 }