コード例 #1
0
 // Token: 0x06002375 RID: 9077 RVA: 0x0009AEBC File Offset: 0x000990BC
 private void Rebuild()
 {
     this.SetStripCount(this.leaderboardInfoList.Count);
     for (int i = 0; i < this.leaderboardInfoList.Count; i++)
     {
         LeaderboardController.LeaderboardInfo leaderboardInfo = this.leaderboardInfoList[i];
         int    num  = Mathf.FloorToInt(leaderboardInfo.timeInSeconds / 60f);
         float  num2 = leaderboardInfo.timeInSeconds - (float)(num * 60);
         string text = string.Format("{0:0}:{1:00.00}", num, num2);
         this.stripList[i].rankLabel.text            = leaderboardInfo.rank.ToString();
         this.stripList[i].usernameLabel.userSteamId = leaderboardInfo.userSteamID;
         this.stripList[i].timeLabel.text            = text;
         this.stripList[i].classIcon.texture         = SurvivorCatalog.GetSurvivorPortrait(leaderboardInfo.survivorIndex);
         this.stripList[i].isMeImage.enabled         = (leaderboardInfo.userSteamID == Client.Instance.SteamId);
         this.stripList[i].usernameLabel.Refresh();
     }
     if (this.animateImageAlpha)
     {
         UnityEngine.UI.Image[] array = new UnityEngine.UI.Image[this.stripList.Count];
         for (int j = 0; j < this.stripList.Count; j++)
         {
             array[this.stripList.Count - 1 - j] = this.stripList[j].GetComponent <UnityEngine.UI.Image>();
         }
         this.animateImageAlpha.ResetStopwatch();
         this.animateImageAlpha.images = array;
     }
 }
コード例 #2
0
 // Token: 0x06002376 RID: 9078 RVA: 0x0009B068 File Offset: 0x00099268
 private void GenerateFakeLeaderboardList(int count)
 {
     this.leaderboardInfoList.Clear();
     for (int i = 1; i <= count; i++)
     {
         LeaderboardController.LeaderboardInfo item = default(LeaderboardController.LeaderboardInfo);
         item.userSteamID   = 76561197995890564UL;
         item.survivorIndex = (SurvivorIndex)UnityEngine.Random.Range(0, SurvivorCatalog.survivorCount - 1);
         item.timeInSeconds = UnityEngine.Random.Range(120f, 600f);
         this.leaderboardInfoList.Add(item);
     }
 }
コード例 #3
0
 // Token: 0x06002381 RID: 9089 RVA: 0x0009B2AB File Offset: 0x000994AB
 private static int SortByTime(LeaderboardController.LeaderboardInfo p1, LeaderboardController.LeaderboardInfo p2)
 {
     return(p1.timeInSeconds.CompareTo(p2.timeInSeconds));
 }