Ejemplo n.º 1
0
 public void UpdateItem(BountyRankListInfo item)
 {
     if (item != null)
     {
         this.ranking.get_gameObject().SetActive(false);
         this.RankIcon.get_gameObject().SetActive(true);
         this.plates.SetActive(true);
         if (item.rank == 1)
         {
             ResourceManager.SetSprite(this.RankIcon, ResourceManager.GetIconSprite("icon_paiming_1"));
             ResourceManager.SetSprite(this.RankIconBackground, ResourceManager.GetIconSprite("ranking_add_1"));
         }
         else if (item.rank == 2)
         {
             ResourceManager.SetSprite(this.RankIcon, ResourceManager.GetIconSprite("icon_paiming_2"));
             ResourceManager.SetSprite(this.RankIconBackground, ResourceManager.GetIconSprite("ranking_add_2"));
         }
         else if (item.rank == 3)
         {
             ResourceManager.SetSprite(this.RankIcon, ResourceManager.GetIconSprite("icon_paiming_3"));
             ResourceManager.SetSprite(this.RankIconBackground, ResourceManager.GetIconSprite("ranking_add_3"));
         }
         else
         {
             this.ranking.set_text(item.rank.ToString());
             this.ranking.get_gameObject().SetActive(true);
             this.RankIcon.get_gameObject().SetActive(false);
             this.plates.SetActive(false);
         }
         this.playerName.set_text(item.roleName);
         this.playerLevel.set_text("Lv" + item.roleLv.ToString());
         ResourceManager.SetSprite(this.playerIcon, UIUtils.GetRoleSmallIcon(item.career));
         this.mark.set_text(item.score.ToString());
     }
 }
Ejemplo n.º 2
0
 public void UpdateList(BountyRankListInfo self, List <BountyRankListInfo> rank)
 {
     this.list.CreateRow(rank.get_Count(), 0);
     for (int i = 0; i < rank.get_Count(); i++)
     {
         this.list.Items.get_Item(i).GetComponent <BountyRankItem>().UpdateItem(rank.get_Item(i));
     }
     if (self == null || self.rank < 1)
     {
         this.MyRankTips.SetActive(true);
         this.MyRank.get_transform().get_parent().get_gameObject().SetActive(false);
         this.MyLevel.get_transform().get_parent().get_gameObject().SetActive(false);
     }
     else
     {
         Debug.LogError(self == null);
         this.MyRankTips.SetActive(false);
         this.MyRank.set_text(self.rank.ToString());
         this.MyLevel.set_text(self.score.ToString());
         this.MyRank.get_transform().get_parent().get_gameObject().SetActive(true);
         this.MyLevel.get_transform().get_parent().get_gameObject().SetActive(true);
     }
 }