コード例 #1
0
        public GameRoom Add(int mapId)
        {
            GameRoom gameRoom = new GameRoom();

            gameRoom.Push(gameRoom.Init, mapId, 10);
            gameRoom.RoomId = _roomId;
            _rooms.Add(_roomId, gameRoom);
            _roomId++;

            return(gameRoom);
        }
コード例 #2
0
        public GameRoom Add(int mapid)
        {
            GameRoom gameRoom = new GameRoom();

            gameRoom.Push(gameRoom.init, mapid);

            lock (_lock)
            {
                gameRoom.RoomID = _roomId;
                _rooms.Add(_roomId, gameRoom);
                _roomId++;
            }

            return(gameRoom);
        }