public void OpenViewForNew(uint petId) { newPet = true; Singleton <PetView> .Instance.LoadPet(petId, gameObject.transform, new Vector3(-100, -15, 0)); SysPet spet = BaseDataMgr.instance.GetDataById <SysPet>(petId); name.text = spet.name; NGUITools.FindInChild <UISprite>(gameObject, "info/gradeicn").spriteName = "hslv"; gameObject.SetActive(true); close = false; SetStars((uint)spet.star); tips.text = "恭喜您获得新幻兽"; PPet pet = Singleton <PetMode> .Instance.GetPetByPetId(petId); PetVo petVo = Singleton <PetMode> .Instance.PetVos[pet.id]; NGUITools.FindInChild <UILabel>(gameObject, "info/fightvalue").text = petVo.fight.ToString(); tipsPlay.PlayReverse(); if (AfterOpenViewGuideDelegate != null) { EventDelegate.Add(tipsPlay.onFinished, AfterOpenViewGuideDelegate); AfterOpenViewGuideDelegate = null; } }
protected override void HandleAfterOpenView() { base.HandleAfterOpenView(); Singleton <MailMode> .Instance.RequestMailBasicInfo(); instantiationChildView(); mailViewTP.PlayReverse(); }
public virtual void CloseView() { if (gameObject != null) { openState = false; HandleBeforeCloseView(); CancelUpdateHandler(); ViewManager.UnRegister(this); if (closeTween != null) //播放关闭动画 { EventDelegate.Add(closeTween.OnEnd, CloseViewHelp); closeTween.Begin(); } else if (showTween != null) { EventDelegate.Add(showTween.onFinished, CloseViewHelp); showTween.PlayReverse(); } else { CloseViewHelp(); } if (playClosedSound) { SoundMgr.Instance.PlayUIAudio(SoundId.Sound_ConfirmClose); } } IsOpened = false; }
private void PlayReverse() { if (current == property) { propertyPlay.PlayReverse(); } if (current == skill) { skillPlay.PlayReverse(); } if (current == exp) { expPlay.PlayReverse(); } }
public void OpenView(uint petId) { SysPet pet = BaseDataMgr.instance.GetDataById <SysPet>(petId); currentPet = pet; SetStoneInfo(); SetFBInfo(); gameObject.SetActive(true); close = false; play.PlayReverse(); Singleton <GoodsMode> .Instance.dataUpdated += DataUpdated; Singleton <CopyMode> .Instance.dataUpdated += DataUpdated; Singleton <DaemonIslandMode> .Instance.dataUpdated += DataUpdated; if (AfterOpenViewGuideDelegate != null) { EventDelegate.Add(play.onFinished, AfterOpenViewGuideDelegate); AfterOpenViewGuideDelegate = null; } }
public void OpenView(uint equipId,int pos,uint petId) { IsClosed = false; equipPos = pos; this.petId = petId; Singleton<GoodsMode>.Instance.dataUpdated += DataUpdated; MeVo.instance.DataUpdated += DataUpdated; Singleton<CopyMode>.Instance.dataUpdated += DataUpdated; Singleton<DaemonIslandMode>.Instance.dataUpdated += DataUpdated; SetEquipInfo(equipId); close = false; gameObject.SetActive(true); openPlay.PlayReverse(); if (AfterOpenPetEquipView != null) { AfterOpenPetEquipView(); AfterOpenPetEquipView = null; } }
public void alertPlayReverse() { alterViewTP.PlayReverse(); }
public void setEquipTipsPlayReverse() { equipTipsTP.PlayReverse(); }
private void OnRightButtonClick(GameObject obj) { SysEquipVo evo = equipList[equipList.Count - 1]; if (evo.material.Length < 4) //不可合成 { if (equipList.Count > 1) //返回上一物品 { equipList.RemoveAt(equipList.Count - 1); ShowRightObjInfo(); } else //关闭右边页面 { rightPlay.PlayReverse(); rightOpen = false; leftPlay.PlayReverse(); } } else //检查合成 { int[] material = StringUtils.GetArrayStringToInt(evo.material); bool oneCanCombine = false; bool allCanCombine = true; for(int i =0;i<material.Count();) //检查子项目 { int cnum = Singleton<GoodsMode>.Instance.GetCountByGoodsId((uint) material[i]); if (cnum< material[i+1]) //检查当前已有的数量 { allCanCombine = false; if (PetLogic.CanCombine((uint)material[i], true, material[i + 1]) > 0) //检查已有数量+可合成数量 { oneCanCombine = true; } } i = i + 2; } if (allCanCombine) { //检查钱 if (evo.spend > MeVo.instance.diam) { MessageManager.Show("当前金币不足!"); } else { Singleton<PetControl>.Instance.CombinePetEquip((uint)evo.id); } } else { if (oneCanCombine) { MessageManager.Show("请先合成绿色数字提示装备!"); } else { MessageManager.Show("材料不足,请先去收集一些吧!"); } } } }