Exemplo n.º 1
0
 // Token: 0x0600237F RID: 9087 RVA: 0x0009B268 File Offset: 0x00099468
 private Action GenerateRequest(Leaderboard leaderboard, LeaderboardController.RequestType callRequestType, int page)
 {
     Leaderboard.FetchScoresCallback < > 9__1;
     return(delegate()
     {
         if (this.currentLeaderboard != leaderboard)
         {
             return;
         }
         int num = page * this.entriesPerPage - this.entriesPerPage / 2;
         Leaderboard leaderboard2 = this.currentLeaderboard;
         Leaderboard.RequestType callRequestType2 = (Leaderboard.RequestType)callRequestType;
         int start = num;
         int end = num + this.entriesPerPage;
         Leaderboard.FetchScoresCallback onSuccess;
         if ((onSuccess = < > 9__1) == null)
         {
             onSuccess = (< > 9__1 = delegate(Leaderboard.Entry[] entries)
             {
                 this.SetLeaderboardInfo(entries.Select(new Func <Leaderboard.Entry, LeaderboardController.LeaderboardInfo>(LeaderboardController.LeaderboardInfoFromSteamLeaderboardEntry)).ToArray <LeaderboardController.LeaderboardInfo>());
             });
         }
         leaderboard2.FetchScores(callRequestType2, start, end, onSuccess, delegate(Result reason)
         {
         });
     });
 }
Exemplo n.º 2
0
        // Token: 0x0600237E RID: 9086 RVA: 0x0009B1DC File Offset: 0x000993DC
        public void SetRequestedInfo(string newLeaderboardName, LeaderboardController.RequestType newRequestType, int newPage)
        {
            bool flag = this.currentLeaderboardName != newLeaderboardName;

            if (flag)
            {
                this.currentLeaderboardName = newLeaderboardName;
                this.currentLeaderboard     = Client.Instance.GetLeaderboard(this.currentLeaderboardName, Client.LeaderboardSortMethod.None, Client.LeaderboardDisplayType.None);
                newPage = 0;
            }
            bool flag2 = this.currentRequestType != newRequestType || flag;
            bool flag3 = this.currentPage != newPage || flag;

            if (flag2)
            {
                this.currentRequestType = newRequestType;
            }
            if (flag3)
            {
                this.currentPage = newPage;
            }
            if (flag || flag2 || flag3)
            {
                this.queuedRequest = this.GenerateRequest(this.currentLeaderboard, newRequestType, newPage);
            }
        }