Sanguosha.UI.Controls.MainPlayerView.PlayAnimation C# (CSharp) Méthode

PlayAnimation() public méthode

public PlayAnimation ( AnimationBase animation, int playCenter, Point offset ) : void
animation Sanguosha.UI.Animations.AnimationBase
playCenter int
offset Point
Résultat void
        public override void PlayAnimation(AnimationBase animation, int playCenter, Point offset)
        {
            Canvas canvas;
            if (playCenter == 1) canvas = animationCenter1;
            else canvas = animationCenter2;
            if (canvas == null) return;
            animation.SetValue(Canvas.LeftProperty, -animation.Width / 2 + offset.X);
            animation.SetValue(Canvas.TopProperty, -animation.Height / 2 + offset.Y);
            canvas.Children.Add(animation);
            animation.Start();
        }