private void DataUpdated(object sender, int code) { if (sender == Singleton <PetMode> .Instance) { if (code == PetMode.UpdatedPet && currentPPet == Singleton <PetMode> .Instance.CurrentPet) { SetPetInfo(); } if (code == PetMode.EvolvePet) { Singleton <PetTipsView> .Instance.OpenViewForEvolve(Singleton <PetMode> .Instance.CurrentPet.id); } if (code == PetMode.SkillUpgrade && current == skill) { int num = (int)Singleton <PetMode> .Instance.UpgradedSkill[0]; NGUITools.FindInChild <UILabel>(skillObjs[num - 1], "addtips").text = PetLogic.GetSkillAddDes((int)currentPPet.petId, num); NGUITools.FindChild(skillObjs[num - 1], "addtips").SetActive(true); NGUITools.FindInChild <TweenPlay>(skillObjs[num - 1], "addtips").PlayForward(); Singleton <PetView> .Instance.PetPlay(Status.ATTACK1); } if (code == PetMode.WearEquip) { Singleton <PetEquipView> .Instance.CloseView(); uint[] equip = Singleton <PetMode> .Instance.WearedEquip; equipTip.transform.localPosition = equipObjs[(int)equip[0] - 1].transform.localPosition; equipTip.SetActive(true); equipTipPlay.PlayForward(); Singleton <PetView> .Instance.PetPlay(Status.ATTACK1); SysEquipVo equipvo = BaseDataMgr.instance.GetDataById <SysEquipVo>(equip[1]); PlayPetTips(PetLogic.GetEquipPropertyDes(equipvo)); } if (code == PetMode.FightPet) { Singleton <PetView> .Instance.PetPlay(Status.Win); } if (code == PetMode.GradeUpgrade) { PlayEquips(); Singleton <PetView> .Instance.PetPlay(Status.Win); PlayPetTips("幻兽成功升阶!"); } if (code == PetMode.LevelUpgrade) { Singleton <PetView> .Instance.PetPlay(Status.Win); PlayPetTips("幻兽等级提升!"); } if (code == PetMode.SkillPointInfo) { SetPetSkillPointInfo(); } } else if (sender == MeVo.instance) { if (currentPPet != null) { SetPetSkill(currentPPet); } } else if (sender == Singleton <GoodsMode> .Instance && code == Singleton <GoodsMode> .Instance.UPDATE_PET_GOODS) { if (currentPPet != null) { SetPetEquips(currentPPet); } SetExpItemNumInfo(); } }