//void showCam() //{ // if (instance != null) // { // CreatWingAvatar(); // } //} public override void onClosed() { instance = null; (CrossApp.singleton.getPlugin("processManager") as processManager).removeProcess(process); A3_WingProxy.getInstance().removeEventListener(A3_WingProxy.ON_LEVEL_EXP_CHANGE, OnLevelExpChange); A3_WingProxy.getInstance().removeEventListener(A3_WingProxy.ON_STAGE_CHANGE, OnStageChange); A3_WingProxy.getInstance().removeEventListener(A3_WingProxy.ON_LEVEL_AUTO_UPGRADE, OnLevelExpChange); A3_WingProxy.getInstance().removeEventListener(A3_WingProxy.ON_SHOW_CHANGE, OnShowStageChange); A3_WingProxy.getInstance().removeEventListener(A3_WingProxy.ON_STAGE_DIFT, OnStageNO); if (m_proAvatar != null) { m_proAvatar.dispose(); m_proAvatar = null; } DisposeAvatar(); DisposeIcon(); fail.gameObject.SetActive(false); success.gameObject.SetActive(false); InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL); transform.FindChild("con_level/expbar/expUp").gameObject.SetActive(false); GRMap.GAME_CAMERA.SetActive(true); }
private void OnEquWing(GameObject go) { A3_WingModel wModel = A3_WingModel.getInstance(); //TODO 装备/卸下翅膀 if (wModel.ShowStage > 0) { if (wingAvatar != null) { if (wingAvatar.transform.FindChild("model/Plus_B").transform.childCount > 0) { GameObject.Destroy(wingAvatar.transform.FindChild("model/Plus_B").transform.GetChild(0).gameObject); } } A3_WingProxy.getInstance().SendShowStage(0); wModel.LastShowState = wModel.ShowStage; go.transform.FindChild("Text").GetComponent <Text>().text = ContMgr.getCont("a3_wing_skin_show"); } else { changeWing(wModel.LastShowState); A3_WingProxy.getInstance().SendShowStage(wModel.LastShowState); go.transform.FindChild("Text").GetComponent <Text>().text = ContMgr.getCont("a3_wing_skin_close"); } }
//自动升级 private void OnUpgradeOneKey(GameObject go) { if (a3_BagModel.getInstance().getItemNumByTpid((uint)needobj_id) < neednum) { addtoget(a3_BagModel.getInstance().getItemDataById((uint)needobj_id)); } A3_WingProxy.getInstance().SendAutoUpgradeLevel(); }
public void OpenWing() { var dt = transform.FindChild("tab/wing"); if (dt) { dt.gameObject.SetActive(true); } A3_WingProxy.getInstance().GetWings(); }
//点击进阶 private void OnStageUpClick(GameObject go) { debug.Log("OnStageUpClick"); /*TODO * 道具足够->金币足够->扣除消耗-> * */ if (a3_BagModel.getInstance().getItemNumByTpid((uint)needobjid_stage) < neednum_stage) { addtoget(a3_BagModel.getInstance().getItemDataById((uint)needobjid_stage)); } A3_WingProxy.getInstance().SendUpgradeStage(costItem); }
public override void onShowed() { instance = this; (CrossApp.singleton.getPlugin("processManager") as processManager).addProcess(process); A3_WingProxy.getInstance().addEventListener(A3_WingProxy.ON_STAGE_CHANGE, OnStageChange); A3_WingProxy.getInstance().addEventListener(A3_WingProxy.ON_SHOW_CHANGE, OnShowStageChange); A3_WingProxy.getInstance().addEventListener(A3_WingProxy.ON_STAGE_DIFT, OnStageNO); A3_WingProxy.getInstance().addEventListener(A3_WingProxy.ON_LEVEL_EXP_CHANGE, OnLevelExpChange); A3_WingProxy.getInstance().addEventListener(A3_WingProxy.ON_LEVEL_AUTO_UPGRADE, OnLevelExpChange); int curStage = wingModel.Stage; int curLevel = wingModel.Level; int showStage = wingModel.ShowStage; ShowStage_yuxuan = 0; curWing = wingModel.dicWingsData[curStage]; WingsData sData = wingModel.dicWingsData[curStage]; InitExpSlider(wingModel.Stage, wingModel.Level, wingModel.Exp); CreatAllWingsIcon(curStage); ShowTitle(sData); RefreshAtt(curStage, curLevel); RefreshStar(curLevel); RefreshCostInfo(wingModel.Stage, wingModel.Level); OnSetIconBGImage(showStage); OnStageSliderSetting(curWing); RefreshPanel(curStage, curLevel); ShowPage(pageIndex); InitExpState(); InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR); transform.FindChild("ig_bg_bg").gameObject.SetActive(false); base.onShowed(); GRMap.GAME_CAMERA.SetActive(false); CreatWingAvatar(); UiEventCenter.getInstance().onWinOpen(uiName); setNeedNum_lvl(); setNeedNum_stage(); //CancelInvoke("showCam"); //Invoke("showCam", 0.2f); }
//点击icon切换翅膀 private void OnSelectWingByIcon(GameObject go) { int stage = wingModel.Stage; int curStage = Int32.Parse(go.name); changeWing(curStage); if (curStage > stage) { refor_icon(); //flytxt.instance.fly("未激活该翅膀"); go.transform.FindChild("icon_bg/yuxuan_on").gameObject.SetActive(true); return; } wingModel.ShowStage = curStage; OnSetIconBGImage(curStage); //点击装备翅膀 A3_WingProxy.getInstance().SendShowStage(curStage); transform.FindChild("btnWing/Text").GetComponent <Text>().text = ContMgr.getCont("a3_wing_skin_close"); }