예제 #1
0
        private void OnLobbyListReceivedCallback(ref LobbyMatchList_t callbackData)
        {
            Lobbies lobbies = new Lobbies();

            for (int lobbyIndex = 0; (long)lobbyIndex < (long)callbackData.m_nLobbiesMatching; ++lobbyIndex)
            {
                ulong lobbyByIndex = Matchmaking.SteamUnityAPI_SteamMatchmaking_GetLobbyByIndex(this._matchmaking, lobbyIndex);
                Lobby lobby1       = (Lobby)null;
                foreach (Lobby lobby2 in this._lobbyList)
                {
                    if (lobby2.SteamID == lobbyByIndex)
                    {
                        lobby1 = lobby2;
                        break;
                    }
                }
                if (lobby1 == null)
                {
                    lobby1 = new Lobby(this._lobbyList, new SteamID(lobbyByIndex));
                }
                lobbies.Add(lobby1);
            }
            this._onLobbyListReceived(lobbies);
        }
예제 #2
0
파일: Lobby.cs 프로젝트: conankzhang/fez
 internal Lobby(Lobbies lobbies, SteamID id)
 {
     this._matchmaking = Lobby.SteamUnityAPI_SteamMatchmaking();
     this._lobbies     = lobbies;
     this._id          = id;
 }