示例#1
0
        // 只有是自己回合开始的时候才会发送
        public void psstRetRefreshBattlePrivilegeUserCmd(stRetRefreshBattlePrivilegeUserCmd msg)
        {
            // 停止倒计时定时器
            m_sceneDZData.m_roundMgr.stopTimer();

            // 显示各种提示和动画
            if(Ctx.m_instance.m_dataPlayer.m_dzData.bSelfSide())
            {
                if (m_sceneDZData.m_roundMgr.bStartRound)          // 只有当回合开始后,如果到自己出牌,才开启倒计时,这个消息一进入对战就发送过来了,但是这个时候是初始卡牌阶段
                {
                    // 显示自己回合
                    m_sceneDZData.m_cardNpcMgr.m_selfRoundTip.playEffect();
                    m_sceneDZData.m_cardNpcMgr.m_roundBtn.myTurn();
                    // 开始定时器
                    m_sceneDZData.m_roundMgr.startDZTimer();
                }
            }
            else 
            {
                m_sceneDZData.m_cardNpcMgr.m_roundBtn.enemyTurn();
                m_sceneDZData.m_sceneDZAreaArr[(int)EnDZPlayer.ePlayerSelf].updateInCardOutState(false);
                m_sceneDZData.m_sceneDZAreaArr[(int)EnDZPlayer.ePlayerSelf].updateCanLaunchAttState(false);
                m_sceneDZData.m_cardNpcMgr.m_roundBtn.updateEffect(false);
                m_sceneDZData.m_gameOpState.cancelAttackOp();
                //m_sceneDZData.m_dragDropData.backCard2Orig();
            }

            m_sceneDZData.m_sceneDZAreaArr[(int)EnDZPlayer.ePlayerSelf].outSceneCardList.updateStateEffect();
            m_sceneDZData.m_sceneDZAreaArr[(int)EnDZPlayer.ePlayerEnemy].outSceneCardList.updateStateEffect();
        }
        // 返回当前谁出牌
        protected void psstRetRefreshBattlePrivilegeUserCmd(ByteBuffer bu)
        {
            // 增加当前出牌次数
            ++Ctx.m_instance.m_dataPlayer.m_dzData.curPlayCardCount;

            stRetRefreshBattlePrivilegeUserCmd cmd = new stRetRefreshBattlePrivilegeUserCmd();
            cmd.derialize(bu);

            Ctx.m_instance.m_dataPlayer.m_dzData.m_priv = cmd.priv;

            UISceneDZ uiDZ = Ctx.m_instance.m_uiSceneMgr.getSceneUI<UISceneDZ>(UISceneFormID.eUISceneDZ);
            if (uiDZ != null && uiDZ.isVisible())
            {
                uiDZ.psstRetRefreshBattlePrivilegeUserCmd(cmd);
            }
        }