Exemplo n.º 1
0
        private void FireCompleted(BaseAnimationObject item, AnimationType type)
        {
            var completed = Completed;

            if (completed != null)
            {
                completed(this, new AnimationCompletedEventArgs(item, type));
            }
        }
Exemplo n.º 2
0
        public void MoveHorz(BaseAnimationObject item, float targetX)
        {
            var animation = new MoveHorzAnimationItem();

            animation.From     = item.X;
            animation.To       = targetX;
            animation.Duration = TimeSpan.FromMilliseconds(4000).TotalSeconds;
            animation.Equation = Equations.ElasticEaseOut;
            animation.Target   = item;
            animation.Snapshot = item.TakeSnapshot();
            animations.Add(animation);
            item.AnimationType |= AnimationType.MoveHorz;
        }
Exemplo n.º 3
0
        public void Shrink(BaseAnimationObject item)
        {
            var animation = new ShrinkAnimationItem();

            animation.From     = 100;
            animation.To       = 10;
            animation.Duration = TimeSpan.FromMilliseconds(800).TotalSeconds;
            animation.Equation = Equations.BounceEaseIn;
            animation.Target   = item;
            animation.Snapshot = item.TakeSnapshot();
            animations.Add(animation);
            item.AnimationType |= AnimationType.Shrink;
        }
Exemplo n.º 4
0
 public AnimationCompletedEventArgs(BaseAnimationObject target, AnimationType type)
 {
     Target = target;
     Type   = type;
 }