Beispiel #1
0
 /// <summary>
 /// 卡片以覆盖方式进入手卡区时,手卡区控件的操作
 /// </summary>
 /// <param name="cv">手卡区控件</param>
 /// <param name="card">卡片</param>
 public static void add2Banish(MyCanvas cv, CardUI card)
 {
     card.reSetAtk();
     card.centerAtVerticalInParent();
     card.clearSigns();
     card.ContextMenu = AllMenu.Instance.cm_outside;
 }
Beispiel #2
0
        /// <summary>
        /// 卡片以覆盖方式进入怪物区时,怪物区控件的操作
        /// </summary>
        /// <param name="cv">怪物区控件</param>
        /// <param name="card">卡片</param>
        public static void add2MagicTrapOP(MyCanvas cv, CardUI card)
        {
            card.reSetAtk();
            switch (card.Status)
            {
            case Status.FRONT_ATK:
            case Status.FRONT_DEF:
                card.set2FrontAtk();
                break;

            case Status.BACK_ATK:
            case Status.BACK_DEF:
                card.set2BackAtk();
                break;

            default:
                break;
            }
            int count = cv.Children.Count;

            if (count == 1)
            {
                card.centerAtVerticalInParent();
                card.ContextMenu = AllMenu.Instance.cm_magictrap;
                //添加指示物
                showSigns(cv, card);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 更新攻击防守显示控件的绑定源
        /// </summary>
        /// <param name="cv"></param>
        /// <param name="card"></param>
        public static void bindingAtk(MyCanvas cv, CardUI card)
        {
            if (cv.tb_atkDef == null)
            {
                return;
            }
            Binding bind = new Binding();

            bind.Source = card;
            bind.Path   = new PropertyPath("CurAtk");
            bind.NotifyOnTargetUpdated    = true;
            cv.tb_atkDef.IsHitTestVisible = true;
            cv.tb_atkDef.SetBinding(TextBlock.TextProperty, bind);
            cv.tb_atkDef.TargetUpdated += new EventHandler <DataTransferEventArgs>((o, e) =>
            {
                if (card.CurAtk == null)
                {
                    return;
                }
                if (!card.CurAtk.Equals(card.info.atk + "/" + card.info.def))
                {
                    cv.tb_atkDef.Style = Application.Current.TryFindResource("tb_AtkDefStyleChanged") as Style;
                }
                else
                {
                    cv.tb_atkDef.Style = Application.Current.TryFindResource("tb_AtkDefStyle") as Style;
                }

                //MessageBox.Show("修改了攻守");
            });
        }
Beispiel #4
0
        /// <summary>
        /// 卡片离开怪物区时,怪物区控件的操作
        /// </summary>
        /// <param name="cv">怪物区控件</param>
        /// <param name="card">卡片</param>
        public static void removeFromMonster(MyCanvas cv, CardUI card)
        {
            if (card.info.sCardType.Equals("XYZ怪兽"))
            {
                cv.WhenRemoveChildren -= removeFromMonster;
                while (cv.Children.Count > 0)
                {
                    CardUI remove = cv.Children[0] as CardUI;
                    //remove.getAwayFromParents();
                    CardAnimation.move2Graveyard(remove);
                }
                cv.WhenRemoveChildren += removeFromMonster;
            }
            int count = cv.Children.Count;

            if (count == 0)
            {
                Binding bind = new Binding();
                BindingOperations.ClearBinding(cv.tb_atkDef, TextBlock.TextProperty);
                cv.tb_atkDef.IsHitTestVisible = false;
                return;
            }
            CardUI top = cv.Children[count - 1] as CardUI;

            if (top.Status == Status.BACK_ATK || top.Status == Status.FRONT_ATK)
            {
                Service.CardOperate.sort_XYZ_atk(cv);
            }
            else
            {
                Service.CardOperate.sort_XYZ_def(cv);
            }
            bindingAtk(cv, top);//绑定顶层卡片攻击力
        }
Beispiel #5
0
 /// <summary>
 /// 显示指示物
 /// </summary>
 /// <param name="cv"></param>
 /// <param name="card"></param>
 private static void showSigns(MyCanvas cv, CardUI card)
 {
     foreach (SignTextBlock item in card.signs)
     {
         cv.signs.Children.Add(item);
     }
 }
Beispiel #6
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            //value.ToString();
            //MainWindow mw = Application.Current.MainWindow as MainWindow;
            //MyCanvas mcv = mw.FindName(parameter.ToString()) as MyCanvas;

            MyCanvas mcv = parameter as MyCanvas;

            //UIElementCollection vc = value as UIElementCollection;
            if (mcv.Children.Count > 0)
            {
                CardUI card = mcv.Children[mcv.Children.Count - 1] as CardUI;
                if (card.info.sCardType.Contains("魔法") || card.info.sCardType.Contains("陷阱"))
                {
                    return(null);
                }
                return(card.CurAtk + "/" + card.CurDef);
            }
            else if (mcv.Children.Count < 1)
            {
                return(null);
            }

            return(null);
            //int re = (int)value;
        }
Beispiel #7
0
        /// <summary>
        /// 卡片以覆盖方式进入手卡区时,手卡区控件的操作
        /// </summary>
        /// <param name="cv">手卡区控件</param>
        /// <param name="card">卡片</param>
        public static void add2HandOP(MyCanvas cv, CardUI card)
        {
            card.clearSigns();
            card.reSetAtk();
            card.set2BackAtk();

            Service.CardOperate.sort_HandCard(cv);
        }
Beispiel #8
0
        /// <summary>
        /// 卡片离开怪物区时,怪物区控件的操作
        /// </summary>
        /// <param name="cv">怪物区控件</param>
        /// <param name="card">卡片</param>
        public static void removeFromMagicTrap(MyCanvas cv, CardUI card)
        {
            int count = cv.Children.Count;

            if (count == 0)
            {
                return;
            }
        }
Beispiel #9
0
        /// <summary>
        /// 获取父控件
        /// </summary>
        /// <param name="card"></param>
        /// <returns></returns>
        public static Canvas getParerent(CardUI card)
        {
            if (card.Parent != null)
            {
                return(card.Parent as Canvas);
            }

            return(null);
        }
Beispiel #10
0
        /// <summary>
        /// 卡片离开手卡区时,手卡区控件的操作
        /// </summary>
        /// <param name="cv">手卡区控件</param>
        /// <param name="card">卡片</param>
        public static void removeFromHandOP(MyCanvas cv, CardUI card)
        {
            int count = cv.Children.Count;

            if (count == 0)
            {
                return;
            }
            Service.CardOperate.sort_HandCard(cv);
        }
Beispiel #11
0
 /// <summary>
 /// 卡片脱离父控件
 /// </summary>
 /// <param name="card"></param>
 public static void getawayParerent(CardUI card)
 {
     //获得卡片所在父控件并解离
     if (card.Parent != null)
     {
         Canvas cv = card.Parent as Canvas;
         cv.Children.Remove(card);
         Canvas.SetLeft(card, 0);
         Canvas.SetTop(card, 0);
     }
 }
Beispiel #12
0
        /// <summary>
        /// 卡片进入墓地时,墓地控件的操作
        /// </summary>
        /// <param name="cv">墓地控件</param>
        /// <param name="card">卡片</param>
        public static void add2GraveyradOP(MyCanvas cv, CardUI card)
        {
            card.reSetAtk();
            card.centerAtVerticalInParent();
            card.clearSigns();
            if ((card.StatusLast == Status.BACK_DEF || card.StatusLast == Status.BACK_ATK) && card.Status == Status.FRONT_ATK)
            {
                CardAnimation.turn(card);
            }

            //card.set2FrontAtk();
        }
Beispiel #13
0
        public DragAdorner(UIElement owner, UIElement adornElement, double opacity, Status status)
            : base(owner)
        {
            this._owner = owner;

            Rectangle r = new Rectangle();

            r.RadiusX = 3;
            r.RadiusY = 3;

            r.Width  = adornElement.DesiredSize.Width;
            r.Height = adornElement.DesiredSize.Height;

            XCenter = adornElement.DesiredSize.Width / 2;
            YCenter = adornElement.DesiredSize.Height / 2;

            VisualBrush _brush;
            Image       img = new Image();

            img.Source = DuelOperate.getInstance().myself.cardback;
            _brush     = new VisualBrush(img);

            CardUI card = adornElement as CardUI;

            if (status == Status.BACK_ATK || status == Status.BACK_DEF)
            {
                //Image img = new Image();
                img.Source = card.backImage;
                _brush     = new VisualBrush(img);
            }
            else
            {
                img.Source = card.originalImage;
                //if (isdef)
                //{
                //    r.Height = adornElement.DesiredSize.Width;
                //    r.Width = adornElement.DesiredSize.Height;
                //}

                _brush = new VisualBrush(img);
            }
            if (status == Status.BACK_DEF || status == Status.FRONT_DEF)
            {
                r.RenderTransformOrigin = new Point(0.5, 0.5);
                r.RenderTransform       = new RotateTransform(-90);
            }

            _brush.Opacity = opacity;


            r.Fill      = _brush;
            this._child = r;
        }
        public void clearSelf()
        {
            CardUI card = this.Tag as CardUI;

            if (card == null)
            {
                return;
            }
            card.signs.Remove(this);
            Tag = null;
            (this.Parent as StackPanel).Children.Remove(this);
            Dispose();
        }
Beispiel #15
0
        /// <summary>
        /// 卡片双击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void ClikDouble(object sender, MouseButtonEventArgs e)
        {
            //Console.WriteLine(e.ToString());
            //Console.WriteLine(e.ChangedButton);
            if (e.ClickCount == 2)
            {
                CardUI card = sender as CardUI;
                CardOperate.Card_DoubleClick(card, e);
            }

            //CardEvent.doubleclick = false;
            //doubleclick = false;
        }
Beispiel #16
0
 /// <summary>
 /// 卡片以覆盖方式进入手卡区时,手卡区控件的操作
 /// </summary>
 /// <param name="cv">手卡区控件</param>
 /// <param name="card">卡片</param>
 public static void add2ExtraOP(MyCanvas cv, CardUI card)
 {
     card.reSetAtk();
     if (card.info.CardDType.Contains("灵摆"))
     {
         card.set2FrontAtk();
     }
     else
     {
         card.set2BackAtk();
     }
     card.centerAtVerticalInParent();
     card.clearSigns();
 }
Beispiel #17
0
        /// <summary>
        /// 卡片以覆盖方式进入手卡区时,手卡区控件的操作
        /// </summary>
        /// <param name="cv">手卡区控件</param>
        /// <param name="card">卡片</param>
        public static void add2Hand(MyCanvas cv, CardUI card)
        {
            card.clearSigns();
            card.reSetAtk();
            card.set2FrontAtk();

            card.CurLocation = new Location(cv.area, cv.Children.IndexOf(card));
            card.outputChange();

            int count = cv.Children.Count;

            Service.CardOperate.sort_HandCard(cv);
            card.ContextMenu = AllMenu.Instance.cm_hand;
        }
Beispiel #18
0
 /// <summary>
 /// 卡片以覆盖方式进入手卡区时,手卡区控件的操作
 /// </summary>
 /// <param name="cv">手卡区控件</param>
 /// <param name="card">卡片</param>
 public static void add2DeckOP(MyCanvas cv, CardUI card)
 {
     card.reSetAtk();
     card.centerAtVerticalInParent();
     card.clearSigns();
     if (card.Status == Status.FRONT_ATK)
     {
         CardAnimation.turn2Back(card);
     }
     else
     {
         card.set2BackAtk();
     }
     card.ContextMenu = AllMenu.Instance.cm_deck;
 }
Beispiel #19
0
        /// <summary>
        /// 卡片进入墓地时,墓地控件的操作
        /// </summary>
        /// <param name="cv">墓地控件</param>
        /// <param name="card">卡片</param>
        public static void add2OPBattle(MyCanvas cv, CardUI card)
        {
            if (card == null)
            {
                return;
            }
            if ((card.StatusLast == Status.BACK_DEF || card.StatusLast == Status.BACK_ATK) && card.Status == Status.FRONT_ATK)
            {
                CardAnimation.turn(card);
            }

            if ((card.StatusLast == Status.FRONT_ATK || card.StatusLast == Status.FRONT_DEF) && card.Status == Status.BACK_ATK)
            {
                CardAnimation.turn(card);
            }
        }
Beispiel #20
0
        public static void insert2MonsterOP(MyCanvas mcv, CardUI card)
        {
            if (mcv.Children.Count == 0)
            {
                if (card.Status == Status.BACK_ATK || card.Status == Status.FRONT_ATK)
                {
                    card.centerAtVerticalInParent();
                }
                else
                {
                    card.centerAtHorizontalInParent();
                }
                card.ContextMenu = AllMenu.Instance.cm_monster;
            }

            if (mcv.Children.Count > 1)
            {
                card.reSetAtk();
                int    count = mcv.Children.Count;
                CardUI top   = mcv.Children[count - 1] as CardUI;
                if (top.Status == Status.FRONT_ATK || top.Status == Status.BACK_ATK)
                {
                    //Canvas.SetTop(card, (cv.ActualHeight - card.ActualHeight) / 2.0);
                    //Canvas.SetLeft(card, 0);
                    Canvas.SetLeft(card, -card.Width);
                    Canvas.SetTop(card, (mcv.ActualHeight - card.Height) / 2);
                    Service.CardOperate.sort_XYZ_atk(mcv);
                }
                else
                {
                    Canvas.SetTop(card, (mcv.ActualHeight - card.ActualHeight) / 2.0);
                    Canvas.SetLeft(card, -card.ActualWidth);
                    Service.CardOperate.sort_XYZ_def2(mcv);
                    //if (count == 2)
                    //{

                    //}
                    //else
                    //{
                    //    Canvas.SetTop(card, (mcv.ActualHeight - card.ActualHeight) / 2.0);
                    //    Canvas.SetLeft(card, 0);
                    //    Service.CardOperate.sort_XYZ_def2(mcv);
                    //
                }
            }
        }
Beispiel #21
0
        /// <summary>
        /// 卡片离开怪物区时,怪物区控件的操作
        /// </summary>
        /// <param name="cv">怪物区控件</param>
        /// <param name="card">卡片</param>
        public static void removeFromMonsterOP(MyCanvas cv, CardUI card)
        {
            int count = cv.Children.Count;

            if (count == 0)
            {
                Binding bind = new Binding();
                BindingOperations.ClearBinding(cv.tb_atkDef, TextBlock.TextProperty);
                cv.tb_atkDef.IsHitTestVisible = false;
                return;
            }
            CardUI top = cv.Children[count - 1] as CardUI;

            if (top.Status == Status.BACK_ATK || top.Status == Status.FRONT_ATK)
            {
                Service.CardOperate.sort_XYZ_atk(cv);
            }
            else
            {
                Service.CardOperate.sort_XYZ_def(cv);
            }
            bindingAtk(cv, top);//绑定顶层卡片攻击力
        }
Beispiel #22
0
        /// <summary>
        /// 初始化加载要预览的卡
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            MyStoryboard msb = CardAnimation.scalXY_120(mcv_from.Children);

            msb.FillBehavior = System.Windows.Media.Animation.FillBehavior.Stop;
            msb.Completed   += (object c, EventArgs d) =>
            {
                Point start = new Point((this.ActualWidth - 56) / 2, (this.ActualHeight - 80 - 80) / 2);
                while (mcv_from.Children.Count != 0)
                {
                    CardUI card = mcv_from.Children[0] as CardUI;
                    card.getAwayFromParents();
                    mcv.Children.Add(card);
                    card.set2FrontAtk();
                    card.BeginAnimation(Canvas.LeftProperty, null);
                    card.BeginAnimation(Canvas.TopProperty, null);
                    Canvas.SetLeft(card, start.X);
                    Canvas.SetTop(card, start.Y);
                }
                setCardAutoFit();
            };
            msb.Begin();
        }
Beispiel #23
0
        /// <summary>
        /// 卡片进入墓地时,墓地控件的操作
        /// </summary>
        /// <param name="cv">墓地控件</param>
        /// <param name="card">卡片</param>
        public static void add2Graveyrad(MyCanvas cv, CardUI card)
        {
            card.reSetAtk();
            card.centerAtVerticalInParent();
            card.clearSigns();
            if (card.Status == Status.BACK_ATK)
            {
                CardAnimation.turn(card);
            }
            else
            {
                card.set2FrontAtk();
            }

            card.ContextMenu = AllMenu.Instance.cm_graveyard;


            #region 指令发送

            MoveInfo moveInfo = new MoveInfo();
            moveInfo.cardID    = CardOperate.getCardID(card);
            moveInfo.isAdd     = true;
            moveInfo.aimArea   = cv.area;
            moveInfo.aimStatus = Status.FRONT_ATK;
            String contentJson = JsonConvert.SerializeObject(moveInfo);

            BaseJson bj = new BaseJson();
            bj.guid   = DuelOperate.getInstance().myself.userindex;
            bj.cid    = "";
            bj.action = ActionCommand.CARD_MOVE;
            bj.json   = contentJson;
            String json = JsonConvert.SerializeObject(bj);
            DuelOperate.getInstance().sendMsg(json);

            #endregion
            //card.set2FrontAtk();
        }
Beispiel #24
0
        /// <summary>
        /// 卡片自适应
        /// </summary>
        private void setCardAutoFit()
        {
            double perrow = 9;

            int rows = (int)Math.Ceiling(mcv.Children.Count / perrow);

            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; perrow *i + j < mcv.Children.Count && perrow *i + j < perrow *(i + 1); j++)
                {
                    //Console.WriteLine(perrow * i + j);
                    CardUI card = mcv.Children[(int)perrow * i + j] as CardUI;
                    if (card != null)
                    {
                        Point start = new Point(Canvas.GetLeft(card), Canvas.GetTop(card));
                        Point end   = new Point(5 * (j + 1) + 56 * j, 5 * (i + 1) + 81 * i);
                        if (start.X != end.X || start.Y != end.Y)
                        {
                            card.Tag = end;
                            MyStoryboard msb = CardAnimation.CanvasXY(start, end, 300);
                            msb.card       = card;
                            msb.Completed += (object c, EventArgs d) =>
                            {
                                msb.card.BeginAnimation(Canvas.LeftProperty, null);
                                msb.card.BeginAnimation(Canvas.TopProperty, null);
                                Point set = (Point)msb.card.Tag;
                                Canvas.SetLeft(msb.card, set.X);
                                Canvas.SetTop(msb.card, set.Y);
                            };
                            msb.FillBehavior = System.Windows.Media.Animation.FillBehavior.Stop;
                            msb.Begin(card);
                        }
                    }
                }
            }
        }
Beispiel #25
0
        private void closeWin()
        {
            mcv.WhenRemoveChildren -= removeFormMcv;
            removeTheDelegateOfMCV();

            MyStoryboard msb = CardAnimation.scalXY_120();

            msb.FillBehavior = FillBehavior.HoldEnd;
            msb.Completed   += (object c, EventArgs d) =>
            {
                if (mcv_from.area == Area.MAINDECK)
                {
                    while (mcv.Children.Count != 0)
                    {
                        Random r     = new Random(40);
                        int    which = r.Next(mcv.Children.Count);
                        CardUI card  = mcv.Children[which] as CardUI;
                        card.getAwayFromParents();
                        card.set2BackAtk();
                        mcv_from.Children.Add(card);
                        card.BeginAnimation(Canvas.LeftProperty, null);
                        card.BeginAnimation(Canvas.TopProperty, null);
                        card.centerAtVerticalInParent();
                    }
                }
                else
                {
                    while (mcv.Children.Count != 0)
                    {
                        CardUI card = mcv.Children[0] as CardUI;
                        card.getAwayFromParents();
                        switch (mcv_from.area)
                        {
                        case Area.BANISH:
                        case Area.EXTRA:
                            if (card.StatusLast == Status.BACK_ATK)
                            {
                                card.set2BackAtk();
                            }
                            break;

                        default:
                            break;
                        }

                        mcv_from.Children.Add(card);
                        card.BeginAnimation(Canvas.LeftProperty, null);
                        card.BeginAnimation(Canvas.TopProperty, null);
                        card.centerAtVerticalInParent();
                    }
                }

                addTheDelegateOfMCV();

                mcv_from.AllowDrop = true;
                if (mcv_from.Children.Count == 0)
                {
                    this.Close();
                }
                else
                {
                    MyStoryboard msb0 = CardAnimation.scalXY_021(mcv_from.Children);
                    //msb0.FillBehavior = System.Windows.Media.Animation.FillBehavior.Stop;
                    msb0.Completed += (object c0, EventArgs d0) =>
                    {
                        this.Close();
                    };
                    msb0.Begin();
                }
            };
            msb.Begin(this);
        }
Beispiel #26
0
 public void removeFormMcv(MyCanvas cv, CardUI card)
 {
     setCardAutoFit();
 }
Beispiel #27
0
 /// <summary>
 /// 卡片离开怪物区时,怪物区控件的操作
 /// </summary>
 /// <param name="cv">怪物区控件</param>
 /// <param name="card">卡片</param>
 public static void removeFromMagicTrapOP(MyCanvas cv, CardUI card)
 {
 }
Beispiel #28
0
 /// <summary>
 /// 卡片以覆盖方式进入手卡区时,手卡区控件的操作
 /// </summary>
 /// <param name="cv">手卡区控件</param>
 /// <param name="card">卡片</param>
 public static void insert2ExtraOP(MyCanvas cv, CardUI card)
 {
     add2Extra(cv, card);
 }
Beispiel #29
0
        /// <summary>
        /// 卡片以覆盖方式进入怪物区时,怪物区控件的操作
        /// </summary>
        /// <param name="mcv">怪物区控件</param>
        /// <param name="card">卡片</param>
        public static void add2MonsterOP(MyCanvas mcv, CardUI card)
        {
            int count = mcv.Children.Count;

            if (count == 1)
            {
                if (card.Status == Status.BACK_ATK || card.Status == Status.FRONT_ATK)
                {
                    card.centerAtVerticalInParent();
                    Service.CardOperate.sort_XYZ_atk(mcv);
                }
                else
                {
                    card.centerAtHorizontalInParent();
                    Service.CardOperate.sort_XYZ_atk(mcv);
                }
                card.ContextMenu = AllMenu.Instance.cm_monster;
            }
            else
            {
                Canvas.SetLeft(card, mcv.ActualWidth - card.Width);
                Canvas.SetTop(card, (mcv.ActualHeight - card.Height) / 2);
                card.ContextMenuOpening += (sender, e) =>
                {
                    card.ContextMenu.DataContext = card;
                };
                CardUI second = mcv.Children[count - 2] as CardUI;

                second.reSetAtk();   //当被叠放时要重置攻击力
                second.clearSigns(); //当被叠放时要清除卡片指示物

                /*
                 * 判断加入前最顶层的卡的状态,若是只要是存在背面或防守,则应先启动相关动画
                 */

                //CardAnimation.setTransformGroup(second);
                TransLibrary.StoryboardChain animator0 = new TransLibrary.StoryboardChain();

                if (second.Status == Status.BACK_DEF)
                {
                    //MyStoryboard msb1 = CardAnimation.ScaleX_120_Rotate(-90, 0, 150, 200);
                    MyStoryboard msb1 = CardAnimation.scalX_120_rotate_9020();
                    msb1.card       = second;
                    msb1.Completed += (object sender_, EventArgs e_) =>
                    {
                        //卡片切换为背面
                        msb1.card.set2FrontAtk();
                        //msb1.card.showImg();
                    };
                    animator0.Animates.Add(msb1);
                    MyStoryboard msb2 = CardAnimation.scalX_021();
                    animator0.Animates.Add(msb2);
                }
                if (second.Status == Status.FRONT_DEF)
                {
                    MyStoryboard msb = CardAnimation.Rotate_D2A();
                    msb.card       = second;
                    msb.Completed += (object sender_, EventArgs e_) =>
                    {
                        msb.card.set2FrontAtk();
                    };
                    animator0.Animates.Add(msb);
                }

                animator0.Begin(second);
                Service.CardOperate.sort_XYZ_atk(mcv);
                //Canvas.SetTop(card, (mcv.ActualHeight - card.ActualHeight) / 2.0);
                //Canvas.SetLeft(card, mcv.ActualWidth - card.ActualWidth);


                //MainWindow mainwin = Application.Current.MainWindow as MainWindow;
                //Point summon2 = mcv.TranslatePoint(new Point(0.5, 0.5), mainwin.OpBattle);
                //Canvas.SetLeft(mainwin.img_overlay_op, summon2.X - ((mainwin.img_overlay_op.Width - mcv.ActualWidth) / 2));
                //Canvas.SetTop(mainwin.img_overlay_op, summon2.Y - ((mainwin.img_overlay_op.Height - mcv.ActualHeight) / 2));
                //CardAnimation.Rotate_Scale_FadeInAndOut(mainwin.img_overlay_op);
            }

            //MainWindow mainwin = Application.Current.MainWindow as MainWindow;

            #region 攻守显示绑定卡片

            if (card.Status != Status.BACK_ATK && card.Status != Status.BACK_DEF)
            {
                bindingAtk(mcv, card);
            }


            #endregion

            //添加指示物
            showSigns(mcv, card);
        }
Beispiel #30
0
 /// <summary>
 /// 卡片离开墓地时,墓地控件操作
 /// </summary>
 /// <param name="cv">墓地控件</param>
 /// <param name="card">卡片</param>
 public static void romoveFromGraveyard(MyCanvas cv, CardUI card)
 {
 }