public LBRoom GetRoomById(int roomId)
        {
            LBRoom ret = null;

            mRoomDic.TryGetValue(roomId, out ret);
            return(ret);
        }
        public int CreateRoom(string roomName)
        {
            LBRoom newRoom = mCachedRoom.GetObject();

            LBLogger.Info(LogTag, "创建完房间 " + newRoom.RoomId);
            mRoomDic[newRoom.RoomId] = newRoom;
            newRoom.SetRoomName(roomName);
            return(newRoom.RoomId);
        }
        public bool IsAllMemberReady(int roomId)
        {
            LBRoom room = GetRoomById(roomId);

            if (null == room)
            {
                return(false);
            }
            return(room.IsAllMemberReady());
        }
        public bool PlayerRoomReady(int playerId)
        {
            LBRoom room = GetRoomByPlayerId(playerId);

            if (room == null)
            {
                return(false);
            }
            return(room.ReadyInRoom(playerId));
        }
        public bool PlayerLeaveRoom(int playerId)
        {
            LBRoom room = GetRoomByPlayerId(playerId);

            if (room == null)
            {
                return(false);
            }
            bool leaveRoomResult = room.LeaveRoom(playerId);

            if (leaveRoomResult)
            {
                mPlayerIdRoomIdDic.Remove(playerId);
            }
            return(leaveRoomResult);
        }
        public bool PlayerEnterRoom(int roomId, int playerId)
        {
            LBRoom room = GetRoomById(roomId);

            if (room == null)
            {
                LBLogger.Error(LogTag, "房间不存在 " + roomId);
                return(false);
            }
            bool enterRoomResult = room.EnterRoom(playerId);

            if (enterRoomResult)
            {
                mPlayerIdRoomIdDic[playerId] = roomId;
            }
            return(enterRoomResult);
        }