Ejemplo n.º 1
0
 private static float BounceIn(float time)
 {
     return(1 - Easer.BounceOut(1 - time));
 }
Ejemplo n.º 2
0
 private static float BounceInOut(float time)
 {
     return(time < 0.5f ? (1 - Easer.BounceOut(1 - 2 * time)) / 2 : (1 + Easer.BounceOut(2 * time - 1)) / 2);
 }
Ejemplo n.º 3
0
        public static float Apply(EaseType ease, float time)
        {
            switch (ease)
            {
            default:
                return(0);

            case EaseType.Linear:
                return(Easer.Linear(time));

            case EaseType.SineIn:
                return(Easer.SineIn(time));

            case EaseType.SineOut:
                return(Easer.SineOut(time));

            case EaseType.SineInOut:
                return(Easer.SineInOut(time));

            case EaseType.QuadIn:
                return(Easer.QuadIn(time));

            case EaseType.QuadOut:
                return(Easer.QuadOut(time));

            case EaseType.QuadInOut:
                return(Easer.QuadInOut(time));

            case EaseType.CubicIn:
                return(Easer.CubicIn(time));

            case EaseType.CubicOut:
                return(Easer.CubicOut(time));

            case EaseType.CubicInOut:
                return(Easer.CubicInOut(time));

            case EaseType.QuartIn:
                return(Easer.QuartIn(time));

            case EaseType.QuartOut:
                return(Easer.QuartOut(time));

            case EaseType.QuartInOut:
                return(Easer.QuartInOut(time));

            case EaseType.QuintIn:
                return(Easer.QuintIn(time));

            case EaseType.QuintOut:
                return(Easer.QuintOut(time));

            case EaseType.QuintInOut:
                return(Easer.QuintInOut(time));

            case EaseType.ExpoIn:
                return(Easer.ExpoIn(time));

            case EaseType.ExpoOut:
                return(Easer.ExpoOut(time));

            case EaseType.ExpoInOut:
                return(Easer.ExpoInOut(time));

            case EaseType.CircIn:
                return(Easer.CircIn(time));

            case EaseType.CircOut:
                return(Easer.CircOut(time));

            case EaseType.CircInOut:
                return(Easer.CircInOut(time));

            case EaseType.BackIn:
                return(Easer.BackIn(time));

            case EaseType.BackOut:
                return(Easer.BackOut(time));

            case EaseType.BackInOut:
                return(Easer.BackInOut(time));

            case EaseType.ElasticIn:
                return(Easer.ElasticIn(time));

            case EaseType.ElasticOut:
                return(Easer.ElasticOut(time));

            case EaseType.ElasticInOut:
                return(Easer.ElasticInOut(time));

            case EaseType.BounceIn:
                return(Easer.BounceIn(time));

            case EaseType.BounceOut:
                return(Easer.BounceOut(time));

            case EaseType.BounceInOut:
                return(Easer.BounceInOut(time));
            }
        }