Beispiel #1
0
 static public int EaseCurve_s(IntPtr l)
 {
     try {
         GoTween a1;
         checkType(l, 1, out a1);
         var ret = GoEaseAnimationCurve.EaseCurve(a1);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    /// <summary>
    /// fetches the actual function for the given ease type
    /// </summary>
    public static Func <float, float, float, float, float> easeFunctionForType(GoEaseType easeType, GoTween tween = null)
    {
        switch (easeType)
        {
        case GoEaseType.Linear:
            return(GoEaseLinear.EaseNone);

        case GoEaseType.BackIn:
            return(GoEaseBack.EaseIn);

        case GoEaseType.BackOut:
            return(GoEaseBack.EaseOut);

        case GoEaseType.BackInOut:
            return(GoEaseBack.EaseInOut);

        case GoEaseType.BounceIn:
            return(GoEaseBounce.EaseIn);

        case GoEaseType.BounceOut:
            return(GoEaseBounce.EaseOut);

        case GoEaseType.BounceInOut:
            return(GoEaseBounce.EaseInOut);

        case GoEaseType.CircIn:
            return(GoEaseCircular.EaseIn);

        case GoEaseType.CircOut:
            return(GoEaseCircular.EaseOut);

        case GoEaseType.CircInOut:
            return(GoEaseCircular.EaseInOut);

        case GoEaseType.CubicIn:
            return(GoEaseCubic.EaseIn);

        case GoEaseType.CubicOut:
            return(GoEaseCubic.EaseOut);

        case GoEaseType.CubicInOut:
            return(GoEaseCubic.EaseInOut);

        case GoEaseType.ElasticIn:
            return(GoEaseElastic.EaseIn);

        case GoEaseType.ElasticOut:
            return(GoEaseElastic.EaseOut);

        case GoEaseType.ElasticInOut:
            return(GoEaseElastic.EaseInOut);

        case GoEaseType.Punch:
            return(GoEaseElastic.Punch);

        case GoEaseType.ExpoIn:
            return(GoEaseExponential.EaseIn);

        case GoEaseType.ExpoOut:
            return(GoEaseExponential.EaseOut);

        case GoEaseType.ExpoInOut:
            return(GoEaseExponential.EaseInOut);

        case GoEaseType.QuadIn:
            return(GoEaseQuadratic.EaseIn);

        case GoEaseType.QuadOut:
            return(GoEaseQuadratic.EaseOut);

        case GoEaseType.QuadInOut:
            return(GoEaseQuadratic.EaseInOut);

        case GoEaseType.QuartIn:
            return(GoEaseQuartic.EaseIn);

        case GoEaseType.QuartOut:
            return(GoEaseQuartic.EaseOut);

        case GoEaseType.QuartInOut:
            return(GoEaseQuartic.EaseInOut);

        case GoEaseType.QuintIn:
            return(GoEaseQuintic.EaseIn);

        case GoEaseType.QuintOut:
            return(GoEaseQuintic.EaseOut);

        case GoEaseType.QuintInOut:
            return(GoEaseQuintic.EaseInOut);

        case GoEaseType.SineIn:
            return(GoEaseSinusoidal.EaseIn);

        case GoEaseType.SineOut:
            return(GoEaseSinusoidal.EaseOut);

        case GoEaseType.SineInOut:
            return(GoEaseSinusoidal.EaseInOut);

        case GoEaseType.AnimationCurve:
            return(GoEaseAnimationCurve.EaseCurve(tween));
        }

        return(GoEaseLinear.EaseNone);
    }