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()); }
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); } }
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)); }
private void RefreshPet() { if (ElementInstanceManager.Instance.GetBlockInfo(this.blockID).isChallenge) { this.BtnFight.get_gameObject().SetActive(false); this.BtnChoosePet.get_gameObject().SetActive(true); this.TextDesFight.set_text(GameDataUtils.GetChineseContent(502313, false)); MinePetInfo minePetInfo = ElementInstanceManager.Instance.m_elementCopyLoginPush.minePetInfos.Find((MinePetInfo a) => a.blockId == this.blockID); if (minePetInfo != null) { this.PetIcon.get_gameObject().SetActive(true); PetInfo petInfo = PetManager.Instance.GetPetInfo(minePetInfo.petId); Pet dataPet = DataReader <Pet> .Get(petInfo.petId); ResourceManager.SetSprite(this.PetIcon.FindChild("ImageIcon").GetComponent <Image>(), PetManager.Instance.GetSelfPetIcon2(dataPet)); ResourceManager.SetSprite(this.PetIcon.FindChild("ImageFrame").GetComponent <Image>(), PetManager.GetPetFrame01(petInfo.star)); this.BtnOut.get_gameObject().SetActive(true); } else { this.PetIcon.get_gameObject().SetActive(false); this.BtnOut.get_gameObject().SetActive(false); } } else { this.TextDesFight.set_text(GameDataUtils.GetChineseContent(502314, false)); this.BtnChoosePet.get_gameObject().SetActive(false); this.BtnOut.get_gameObject().SetActive(false); this.BtnFight.get_gameObject().SetActive(true); } }