public override void Release() { this.PVPData = null; this.RankingData.Clear(); this.ChallengePVPData.Clear(); this.matchData = null; }
private void Init() { MatchRoleInfo matchData = PVPManager.Instance.MatchData; ResourceManager.SetTexture(this.leftBg, UIUtils.GetRolePVPImage(EntityWorld.Instance.EntSelf.TypeID)); this.leftName.set_text(string.Format("{1} Lv.{0}", EntityWorld.Instance.EntSelf.Lv, EntityWorld.Instance.EntSelf.Name)); this.leftFighting.set_text(string.Format("战斗力: {0}", EntityWorld.Instance.EntSelf.Fighting)); this.leftIntegral.set_text(string.Format("积分: <color=#ffeb4b>{0}</color>", PVPManager.Instance.PVPData.score)); ResourceManager.SetSprite(this.leftIntegralIcon, ResourceManager.GetIconSprite(PVPManager.Instance.GetIntegralByScore(PVPManager.Instance.PVPData.score, true))); ResourceManager.SetTexture(this.rightBg, UIUtils.GetRolePVPImage((int)matchData.career)); this.rightName.set_text(string.Format("{1} Lv.{0}", matchData.lv, matchData.name)); this.rightFighting.set_text(string.Format("战斗力: {0}", matchData.fighting)); this.rightIntegral.set_text(string.Format("积分: <color=#ffeb4b>{0}</color>", matchData.score)); ResourceManager.SetSprite(this.rightIntegralIcon, ResourceManager.GetIconSprite(PVPManager.Instance.GetIntegralByScore(matchData.score, true))); }
private void OnGetMatchRoleData(short state, MatchRoleInfo down = null) { if (state != 0) { StateManager.Instance.StateShow(state, 0); return; } if (down != null) { InstanceManager.ChangeInstanceManager(PVPInstance.Instance, false); this.isEnterPVP = true; this.matchData = down; PVPVSUI pVPVSUI = UIManagerControl.Instance.OpenUI("PVPVSUI", UINodesManager.TopUIRoot, false, UIType.NonPush) as PVPVSUI; PetFormation petFormation = PetManager.Instance.Formation.Find((PetFormation a) => a.formationId == PetManager.Instance.CurrentFormationID); for (int i = 0; i < 3; i++) { pVPVSUI.MyPets[i].SetActive(false); } if (petFormation != null && petFormation.petFormationArr != null && petFormation.petFormationArr.Int64Array != null) { for (int j = 0; j < petFormation.petFormationArr.Int64Array.get_Count(); j++) { Int64IndexValue int64IndexValue = petFormation.petFormationArr.Int64Array.get_Item(j); PetInfo petInfo = PetManager.Instance.GetPetInfo(int64IndexValue.value); Pet pet = DataReader <Pet> .Get(petInfo.petId); ResourceManager.SetSprite(pVPVSUI.MyPets[int64IndexValue.index].get_transform().Find("Icon").GetComponent <Image>(), PetManager.Instance.GetSelfPetIcon(pet)); ResourceManager.SetSprite(pVPVSUI.MyPets[int64IndexValue.index].get_transform().Find("Type").GetComponent <Image>(), ResourceManager.GetIconSprite("fight_pet_biaoshi" + pet.function)); pVPVSUI.MyPets[int64IndexValue.index].SetActive(true); } } for (int k = 0; k < 3; k++) { pVPVSUI.OpponentPets[k].SetActive(false); } for (int l = 0; l < down.petInfos.get_Count(); l++) { Pet pet2 = DataReader <Pet> .Get(down.petInfos.get_Item(l).typeId); ResourceManager.SetSprite(pVPVSUI.OpponentPets[l].get_transform().Find("Icon").GetComponent <Image>(), PetManager.Instance.GetSelfPetIcon(pet2)); ResourceManager.SetSprite(pVPVSUI.OpponentPets[l].get_transform().Find("Type").GetComponent <Image>(), ResourceManager.GetIconSprite("fight_pet_biaoshi" + pet2.function)); pVPVSUI.OpponentPets[l].SetActive(true); } } }