コード例 #1
0
    public RoomData(GameBase gameBase, string gameRoomType)
    {
        m_gameBase     = gameBase;
        m_roomId       = RoomManager.getOneRoomID();
        m_gameRoomType = gameRoomType;

        // 场次tag
        {
            List <string> list = new List <string>();
            CommonUtil.splitStr(m_gameRoomType, list, '_');
            if (list[0].CompareTo("PVP") == 0)
            {
                m_tag       = TLJCommon.Consts.Tag_JingJiChang;
                m_wanfaType = (int)TLJCommon.Consts.WanFaType.WanFaType_PVP;
            }
            if (list[0].CompareTo("XiuXian") == 0)
            {
                m_tag       = TLJCommon.Consts.Tag_XiuXianChang;
                m_wanfaType = (int)TLJCommon.Consts.WanFaType.WanFaType_Relax;

                // 经典场不可抄底
                if (list[1].CompareTo("JingDian") == 0)
                {
                    m_canChaoDi = false;
                }
            }
        }

        m_timerUtil.setTimerCallBack(timerCallback);
        m_timerUtil_breakRom.setTimerCallBack(timerCallback_breakRom);
        m_timerUtil_FaPai.setTimerCallBack(timerCallback_fapai);

        // 匹配队友倒计时
        m_timerUtil.startTimer(RandomUtil.getRandom(3, m_matchTime), TimerType.TimerType_waitMatchTimeOut);
    }
コード例 #2
0
    public DDZ_RoomData(DDZ_GameBase gameBase, string gameRoomType)
    {
        m_gameBase     = gameBase;
        m_roomId       = RoomManager.getOneRoomID();
        m_gameRoomType = gameRoomType;

        m_tag = TLJCommon.Consts.Tag_DouDiZhu_Game;

        m_timerUtil.setTimerCallBack(timerCallback);
        m_timerUtil_breakRom.setTimerCallBack(timerCallback_breakRom);
        m_timerUtil_FaPai.setTimerCallBack(timerCallback_fapai);

        // 匹配队友倒计时
        m_timerUtil.startTimer(RandomUtil.getRandom(3, m_matchTime), TimerType.TimerType_waitMatchTimeOut);
    }
コード例 #3
0
 // 开始定时发牌
 public void startFaPaiTimer()
 {
     m_timerUtil_FaPai.startTimer(m_fapaiDurTime, TimerType.TimerType_fapai);
 }
コード例 #4
0
 // 强制解散房间倒计时
 public void startBreakRoomTimer()
 {
     m_timerUtil_breakRom.startTimer(m_roomAliveTime, TimerType.TimerType_breakRoom);
 }