Exemple #1
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();
        }
Exemple #2
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);
            }
        }
Exemple #3
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();
        }