Esempio n. 1
0
        public override void PlayAnimation(AnimationBase animation, int playCenter, Point offset)
        {
            Canvas canvas;

            if (playCenter == 1)
            {
                canvas = animationCenter1;
            }
            else
            {
                canvas = animationCenter2;
            }

            animation.SetValue(Canvas.LeftProperty, -animation.Width / 2 + offset.X);
            animation.SetValue(Canvas.TopProperty, -animation.Height / 2 + offset.Y);
            canvas.Children.Add(animation);
            animation.Start();
        }