Пример #1
0
        protected override AnimationBuilder Apply(
            Direction direction, AnimationBuilder animation)
        {
            switch (direction)
            {
            case Direction.Left:
                return(animation.Effect(
                           _cover ? AnimationEffect.CoverLeft : AnimationEffect.UncoverLeft));

            case Direction.Right:
                return(animation.Effect(
                           _cover ? AnimationEffect.CoverRight : AnimationEffect.UncoverRight));

            case Direction.Up:
                return(animation.Effect(
                           _cover ? AnimationEffect.CoverUp : AnimationEffect.UncoverUp));

            case Direction.Down:
                return(animation.Effect(
                           _cover ? AnimationEffect.CoverDown : AnimationEffect.UncoverDown));
            }
            return(animation);
        }
Пример #2
0
        protected override AnimationBuilder Apply(
            Direction direction, AnimationBuilder animation)
        {
            switch (direction)
            {
            case Direction.Left:
                return(animation.Effect(
                           _push ? AnimationEffect.PushLeft : AnimationEffect.MoveLeft));

            case Direction.Right:
                return(animation.Effect(
                           _push ? AnimationEffect.PushRight : AnimationEffect.MoveRight));

            case Direction.Up:
                return(animation.Effect(
                           _push ? AnimationEffect.PushUp : AnimationEffect.MoveUp));

            case Direction.Down:
                return(animation.Effect(
                           _push ? AnimationEffect.PushDown : AnimationEffect.MoveDown));
            }
            return(animation);
        }