Exemple #1
0
 private void OnLeaderboardEntriesRetrievedCallback(ref LeaderboardScoresDownloaded_t callbackData)
 {
     if (callbackData.m_cEntryCount > 0)
     {
         int num = callbackData.m_cEntryCount;
         LeaderboardEntry_t leaderboardEntry   = new LeaderboardEntry_t();
         LeaderboardEntries leaderboardEntries = new LeaderboardEntries(this);
         int[] scoreDetails1 = new int[this._maxDetails];
         for (int index = 0; index < num; ++index)
         {
             if (Leaderboard.SteamUnityAPI_SteamUserStats_GetDownloadedLeaderboardEntry(this._leaderboards.Stats, callbackData.m_hSteamLeaderboardEntries, index, ref leaderboardEntry, scoreDetails1, this._maxDetails))
             {
                 List <int> scoreDetails2 = (List <int>)null;
                 if (scoreDetails1 != null)
                 {
                     scoreDetails2 = new List <int>((IEnumerable <int>)scoreDetails1);
                 }
                 leaderboardEntries.Add(new LeaderboardEntry(leaderboardEntry.m_steamIDUser, leaderboardEntry.m_nGlobalRank, leaderboardEntry.m_nScore, scoreDetails2));
             }
         }
         this._onLeaderboardEntriesRetrieved(leaderboardEntries);
     }
     else
     {
         this._onLeaderboardEntriesRetrieved((LeaderboardEntries)null);
     }
 }
Exemple #2
0
 private void OnLeaderboardEntriesRetrievedCallback(ref LeaderboardScoresDownloaded_t callbackData)
 {
   if (callbackData.m_cEntryCount > 0)
   {
     int num = callbackData.m_cEntryCount;
     LeaderboardEntry_t leaderboardEntry = new LeaderboardEntry_t();
     LeaderboardEntries leaderboardEntries = new LeaderboardEntries(this);
     int[] scoreDetails1 = new int[this._maxDetails];
     for (int index = 0; index < num; ++index)
     {
       if (Leaderboard.SteamUnityAPI_SteamUserStats_GetDownloadedLeaderboardEntry(this._leaderboards.Stats, callbackData.m_hSteamLeaderboardEntries, index, ref leaderboardEntry, scoreDetails1, this._maxDetails))
       {
         List<int> scoreDetails2 = (List<int>) null;
         if (scoreDetails1 != null)
           scoreDetails2 = new List<int>((IEnumerable<int>) scoreDetails1);
         leaderboardEntries.Add(new LeaderboardEntry(leaderboardEntry.m_steamIDUser, leaderboardEntry.m_nGlobalRank, leaderboardEntry.m_nScore, scoreDetails2));
       }
     }
     this._onLeaderboardEntriesRetrieved(leaderboardEntries);
   }
   else
     this._onLeaderboardEntriesRetrieved((LeaderboardEntries) null);
 }