Exemplo n.º 1
0
    public PlayerData(IntPtr connId, string uid, bool isAI, string gameRoomType)
    {
        m_connId       = connId;
        m_uid          = uid;
        m_isAI         = isAI;
        m_gameRoomType = gameRoomType;

        // 场次
        {
            List <string> list = new List <string>();
            CommonUtil.splitStr(m_gameRoomType, list, '_');
            if (list[0].CompareTo("PVP") == 0)
            {
                m_score = 1000;
                m_isPVP = true;
            }
            if (list[0].CompareTo("XiuXian") == 0)
            {
            }
        }

        if (m_isAI)
        {
            m_isOffLine = true;
            m_isTuoGuan = true;
        }

        m_timerUtil.setTimerCallBack(timerCallback);
        m_timerUtilOffLine.setTimerCallBack(timerCallback_offLine);
    }
Exemplo n.º 2
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);
    }
Exemplo n.º 3
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);
    }
Exemplo n.º 4
0
    public DDZ_PlayerData(IntPtr connId, string uid, bool isAI, string gameRoomType)
    {
        m_connId       = connId;
        m_uid          = uid;
        m_isAI         = isAI;
        m_gameRoomType = gameRoomType;

        if (m_isAI)
        {
            m_isOffLine = true;
            m_isTuoGuan = true;
        }

        m_timerUtil.setTimerCallBack(timerCallback);
        m_timerUtilOffLine.setTimerCallBack(timerCallback_offLine);
    }