Exemple #1
0
 public void RunCallbacks()
 {
   CommunityExpress.SteamUnityAPI_RunCallbacks();
   if (this._gameserver != null && this._gameserver.IsInitialized)
   {
     CommunityExpress.SteamUnityAPI_SteamGameServer_RunCallbacks();
     for (int index = 0; index < this._gameserverUserStatsReceivedCallHandles.Count; ++index)
     {
       ulong callHandle = this._gameserverUserStatsReceivedCallHandles[index];
       byte failed;
       if (CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(callHandle, out failed))
       {
         GSStatsReceived_t result = new GSStatsReceived_t();
         UserStatsReceived_t CallbackData = new UserStatsReceived_t();
         CommunityExpress.SteamUnityAPI_SteamUtils_GetGameServerUserStatsReceivedResult(callHandle, out result, out failed);
         CallbackData.m_nGameID = (ulong) CommunityExpress.SteamUnityAPI_SteamUtils_GetAppID();
         CallbackData.m_steamIDUser = result.m_steamIDUser;
         CallbackData.m_eResult = result.m_eResult;
         this._gameserverUserStatsReceivedCallbacks[index](ref CallbackData);
         this._gameserverUserStatsReceivedCallHandles.RemoveAt(index);
         this._gameserverUserStatsReceivedCallbacks.RemoveAt(index);
         --index;
       }
     }
   }
   if (this._networking != null && this._networking.IsInitialized)
     this._networking.CheckForNewP2PPackets();
   byte failed1;
   if ((long) this._userGetEncryptedAppTicketCallHandle != 0L && CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._userGetEncryptedAppTicketCallHandle, out failed1))
   {
     this._userGetEncryptedAppTicketCallback();
     this._userGetEncryptedAppTicketCallHandle = 0UL;
   }
   byte failed2;
   if ((long) this._lobbyCreatedCallHandle != 0L && CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._lobbyCreatedCallHandle, out failed2))
   {
     LobbyCreated_t result = new LobbyCreated_t();
     CommunityExpress.SteamUnityAPI_SteamUtils_GetLobbyCreatedResult(this._lobbyCreatedCallHandle, out result, out failed2);
     this._lobbyCreatedCallback(ref result);
     this._lobbyCreatedCallHandle = 0UL;
   }
   byte failed3;
   if ((long) this._lobbyListReceivedCallHandle != 0L && CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._lobbyListReceivedCallHandle, out failed3))
   {
     LobbyMatchList_t result = new LobbyMatchList_t();
     CommunityExpress.SteamUnityAPI_SteamUtils_GetLobbyListReceivedResult(this._lobbyListReceivedCallHandle, out result, out failed3);
     this._lobbyListReceivedCallback(ref result);
     this._lobbyListReceivedCallHandle = 0UL;
   }
   byte failed4;
   if ((long) this._lobbyJoinedCallHandle == 0L || !CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._lobbyJoinedCallHandle, out failed4))
     return;
   LobbyEnter_t result1 = new LobbyEnter_t();
   CommunityExpress.SteamUnityAPI_SteamUtils_GetLobbyEnteredResult(this._lobbyJoinedCallHandle, out result1, out failed4);
   this._lobbyJoinedCallback(ref result1);
   this._lobbyJoinedCallHandle = 0UL;
 }
Exemple #2
0
        public void RunCallbacks()
        {
            CommunityExpress.SteamUnityAPI_RunCallbacks();
            if (this._gameserver != null && this._gameserver.IsInitialized)
            {
                CommunityExpress.SteamUnityAPI_SteamGameServer_RunCallbacks();
                for (int index = 0; index < this._gameserverUserStatsReceivedCallHandles.Count; ++index)
                {
                    ulong callHandle = this._gameserverUserStatsReceivedCallHandles[index];
                    byte  failed;
                    if (CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(callHandle, out failed))
                    {
                        GSStatsReceived_t   result       = new GSStatsReceived_t();
                        UserStatsReceived_t CallbackData = new UserStatsReceived_t();
                        CommunityExpress.SteamUnityAPI_SteamUtils_GetGameServerUserStatsReceivedResult(callHandle, out result, out failed);
                        CallbackData.m_nGameID     = (ulong)CommunityExpress.SteamUnityAPI_SteamUtils_GetAppID();
                        CallbackData.m_steamIDUser = result.m_steamIDUser;
                        CallbackData.m_eResult     = result.m_eResult;
                        this._gameserverUserStatsReceivedCallbacks[index](ref CallbackData);
                        this._gameserverUserStatsReceivedCallHandles.RemoveAt(index);
                        this._gameserverUserStatsReceivedCallbacks.RemoveAt(index);
                        --index;
                    }
                }
            }
            if (this._networking != null && this._networking.IsInitialized)
            {
                this._networking.CheckForNewP2PPackets();
            }
            byte failed1;

            if ((long)this._userGetEncryptedAppTicketCallHandle != 0L && CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._userGetEncryptedAppTicketCallHandle, out failed1))
            {
                this._userGetEncryptedAppTicketCallback();
                this._userGetEncryptedAppTicketCallHandle = 0UL;
            }
            byte failed2;

            if ((long)this._lobbyCreatedCallHandle != 0L && CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._lobbyCreatedCallHandle, out failed2))
            {
                LobbyCreated_t result = new LobbyCreated_t();
                CommunityExpress.SteamUnityAPI_SteamUtils_GetLobbyCreatedResult(this._lobbyCreatedCallHandle, out result, out failed2);
                this._lobbyCreatedCallback(ref result);
                this._lobbyCreatedCallHandle = 0UL;
            }
            byte failed3;

            if ((long)this._lobbyListReceivedCallHandle != 0L && CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._lobbyListReceivedCallHandle, out failed3))
            {
                LobbyMatchList_t result = new LobbyMatchList_t();
                CommunityExpress.SteamUnityAPI_SteamUtils_GetLobbyListReceivedResult(this._lobbyListReceivedCallHandle, out result, out failed3);
                this._lobbyListReceivedCallback(ref result);
                this._lobbyListReceivedCallHandle = 0UL;
            }
            byte failed4;

            if ((long)this._lobbyJoinedCallHandle == 0L || !CommunityExpress.SteamUnityAPI_SteamUtils_IsAPICallCompleted(this._lobbyJoinedCallHandle, out failed4))
            {
                return;
            }
            LobbyEnter_t result1 = new LobbyEnter_t();

            CommunityExpress.SteamUnityAPI_SteamUtils_GetLobbyEnteredResult(this._lobbyJoinedCallHandle, out result1, out failed4);
            this._lobbyJoinedCallback(ref result1);
            this._lobbyJoinedCallHandle = 0UL;
        }
Exemple #3
0
 private static bool SteamUnityAPI_SteamUtils_GetGameServerUserStatsReceivedResult(ulong callHandle, out GSStatsReceived_t result, out byte failed);
Exemple #4
0
 private static bool SteamUnityAPI_SteamUtils_GetGameServerUserStatsReceivedResult(ulong callHandle, out GSStatsReceived_t result, out byte failed);