Beispiel #1
0
 public void SetItem(PetInfo petInfo = null, Pet dataPet = null, bool islimit = false)
 {
     if (petInfo != null)
     {
         ResourceManager.SetSprite(this.m_spImageFrame, PetManager.GetPetFrame01(petInfo.star));
         ResourceManager.SetSprite(this.m_spImageFramePet, PetManager.GetPetFrame02(petInfo.star));
         ResourceManager.SetSprite(this.m_spImageIcon, PetManager.Instance.GetSelfPetIcon2(dataPet));
         if (this.m_spImageQuality != null)
         {
             ResourceManager.SetSprite(this.m_spImageQuality, PetManager.GetPetQualityIcon(petInfo.star));
         }
         if (this.m_lblTextPower != null)
         {
             this.m_lblTextPower.set_text(petInfo.publicBaseInfo.simpleInfo.Fighting.ToString());
         }
         this.m_lblTextName.set_text(GameDataUtils.GetChineseContent(dataPet.name, false));
         this.m_lblTextLV.GetComponent <Text>().set_text("Lv." + petInfo.lv);
         this.ShowHave(true);
         this.ShowLimit(islimit);
     }
     else
     {
         this.ShowHave(false);
     }
 }
Beispiel #2
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());
    }
Beispiel #3
0
    public void SetItemToPet(int petId, int star = 1)
    {
        this.m_petId = petId;
        Pet dataPet = DataReader <Pet> .Get(petId);

        this.m_spImageFramePet.set_enabled(true);
        ResourceManager.SetSprite(this.m_spImageFrame, GameDataUtils.GetItemFrameByColor(1));
        ResourceManager.SetSprite(this.m_spImageFramePet, PetManager.GetPetFrame02(star));
        ResourceManager.SetSprite(this.m_spImageIcon, PetManager.Instance.GetSelfPetIcon2(dataPet));
    }
Beispiel #4
0
 public void SetItem(Pet dataPet, PetInfo petinfo)
 {
     if (dataPet == null)
     {
         return;
     }
     if (this.m_spImageFrame == null)
     {
         return;
     }
     if (this.m_spImageFramePet == null)
     {
         return;
     }
     ResourceManager.SetSprite(this.m_spImageFrame, PetManager.GetPetFrame01(petinfo.star));
     ResourceManager.SetSprite(this.m_spImageFramePet, PetManager.GetPetFrame02(petinfo.star));
     ResourceManager.SetSprite(this.m_spImageIcon, PetManager.Instance.GetSelfPetIcon2(dataPet));
 }