Пример #1
0
        public static float Blend(EB.Director.BlendMode mode, float t)
        {
            switch (mode)
            {
            case BlendMode.Cut:
            {
                t = 0.0f;                                 // do the cut
            }
            break;

            case BlendMode.EaseIn:
            {
                t = EZAnimation.sinusOut(t, 0, 1, 1);
            }
            break;

            case BlendMode.EaseOut:
            {
                t = EZAnimation.sinusIn(t, 0, 1, 1);
            }
            break;

            case BlendMode.CubicIn:
            {
                t = EZAnimation.cubicIn(t, 0, 1, 1);
            }
            break;

            case BlendMode.CubicOut:
            {
                t = EZAnimation.cubicOut(t, 0, 1, 1);
            }
            break;

            case BlendMode.EaseOutIn:
            {
                t = EZAnimation.sinusInOut(t, 0, 1, 1);
            }
            break;

            case BlendMode.EaseInOut:
            {
                t = EZAnimation.sinusOutIn(t, 0, 1, 1);
            }
            break;

            case BlendMode.CubicInOut:
            {
                t = EZAnimation.cubicInOut(t, 0, 1, 1);
            }
            break;

            case BlendMode.CubicOutIn:
            {
                t = EZAnimation.cubicOutIn(t, 0, 1, 1);
            }
            break;

            default:
                // linear
                break;
            }
            return(t);
        }