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(); }
public void PlayAnimation(AnimationBase animation) { animation.HorizontalAlignment = HorizontalAlignment.Center; animation.VerticalAlignment = VerticalAlignment.Center; animationCenter.Children.Add(animation); animation.Start(); }
public void PlayAnimation(AnimationBase animation, Point offset) { animationCenter.Children.Add(animation); animation.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; animation.VerticalAlignment = System.Windows.VerticalAlignment.Center; animation.Start(); }
public virtual void PlayAnimation(AnimationBase animation, int playCenter, Point offset) { }
public void PlayAnimationAsync(AnimationBase animation, int playCenter, Point offset) { Application.Current.Dispatcher.BeginInvoke((ThreadStart)delegate() { PlayAnimation(animation, playCenter, offset); }); }