Exemplo n.º 1
0
    private void SetType(RankDataUnite data)
    {
        string text = string.Empty;
        long   num  = 0L;

        switch (data.rankingType)
        {
        case RankingType.ENUM.Lv:
            this.SetHideHeadAndPetHead(false);
            text = "主角等级";
            num  = data.num;
            ResourceManager.SetSprite(this.m_headIcon, UIUtils.GetRoleSmallIcon((int)data.career));
            if (this.m_headBgImg != null)
            {
                ResourceManager.SetSprite(this.m_headBgImg, GameDataUtils.GetItemFrameByColor(1));
            }
            if (this.m_headBgImg2 != null)
            {
                this.m_headBgImg2.set_enabled(false);
            }
            break;

        case RankingType.ENUM.Fighting:
            this.SetHideHeadAndPetHead(false);
            text = "综合战斗力";
            num  = data.num;
            ResourceManager.SetSprite(this.m_headIcon, UIUtils.GetRoleSmallIcon((int)data.career));
            if (this.m_headBgImg != null)
            {
                ResourceManager.SetSprite(this.m_headBgImg, GameDataUtils.GetItemFrameByColor(1));
            }
            if (this.m_headBgImg2 != null)
            {
                this.m_headBgImg2.set_enabled(false);
            }
            break;

        case RankingType.ENUM.PetFighting:
            this.SetHideHeadAndPetHead(true);
            text = "宠物战斗力";
            num  = data.num;
            if (this.m_headIcon != null)
            {
                ResourceManager.SetSprite(this.m_headIcon, PetManagerBase.GetPlayerPetIcon2((int)data.petId, data.petStar));
            }
            if (this.m_headBgImg != null)
            {
                ResourceManager.SetSprite(this.m_headBgImg, PetManager.GetPetFrame01(data.petStar));
            }
            if (this.m_headBgImg2 != null)
            {
                this.m_headBgImg2.set_enabled(true);
                ResourceManager.SetSprite(this.m_headBgImg2, PetManager.GetPetFrame02(data.petStar));
            }
            break;
        }
        this.roleName.set_text(data.roleName);
        this.roleLevelName.set_text(text + ":");
        this.level.set_text(num.ToString());
    }
Exemplo n.º 2
0
    private void SetRank(RankDataUnite rank)
    {
        string rank2 = this.GetRank(rank.ranking);

        if (rank.ranking > 3)
        {
            this.SwitchRankImg(false);
            this.textRank.set_text(rank2);
            this.m_bgAdd.get_gameObject().SetActive(false);
        }
        else
        {
            this.SwitchRankImg(true);
            ResourceManager.SetSprite(this.imgRank, ResourceManager.GetIconSprite(rank2));
            this.m_bgAdd.get_gameObject().SetActive(true);
        }
    }
Exemplo n.º 3
0
 public void UpdateItem(RankDataUnite data)
 {
     this.m_RankData = data;
     this.SetRank(data);
     this.SetType(data);
 }