public void GetAllWingsXMLData() { this.dicWingsData = new Dictionary <int, WingsData>(); bool flag = this.wingUpItem == null; if (flag) { Dictionary <string, uint> expr_1F = new Dictionary <string, uint>(); expr_1F["levelItemId"] = XMLMgr.instance.GetSXML("wings.level_item", "").getUint("item_id"); expr_1F["stageItemId"] = XMLMgr.instance.GetSXML("wings.stage_item", "").getUint("item_id"); this.wingUpItem = expr_1F; } List <SXML> nodeList = this.WingXML.GetNodeList("wing_stage", ""); for (int i = 0; i < nodeList.Count; i++) { WingsData wingsData = new WingsData(); wingsData.stage = nodeList[i].getInt("stage_id"); wingsData.spriteFile = "icon/wing/" + nodeList[i].getString("icon"); wingsData.stageCostGold = nodeList[i].getUint("cost_gold"); wingsData.stageCrystalMin = nodeList[i].getUint("crystal_min"); wingsData.stageCrystalMax = nodeList[i].getUint("crystal_max"); wingsData.stageCrystalStep = nodeList[i].getUint("crystal_step"); wingsData.stageRateMin = nodeList[i].getUint("rate_min"); wingsData.stageRateMax = nodeList[i].getUint("rate_max"); wingsData.wingName = nodeList[i].getString("name"); this.dicWingsData[wingsData.stage] = wingsData; } }
//进阶成功 private void OnStageChange(GameEvent e) { //success.enabled = false; int curStage = wingModel.Stage; WingsData sData = wingModel.dicWingsData[curStage]; ShowTitle(sData); RefreshCostInfo(wingModel.Stage, wingModel.Level); RefreshPanel(wingModel.ShowStage, wingModel.Level); ShowPage(pageIndex); RefreshAtt(wingModel.Stage, wingModel.Level); RefreshStar(wingModel.Level); OnUnLockNweStage(); InitExpSlider(wingModel.Stage, wingModel.Level, 0); costItem = (int)sData.stageCrystalMin; textStageCostItemSum.text = costItem.ToString(); neednum_stage = costItem; success.gameObject.SetActive(true); sliderStage.value = 1; //success.enabled = true; success.Play("wing_jjsuccess", -1, 0); curWing = wingModel.dicWingsData[curStage]; OnStageSliderSetting(curWing); DisposeAvatar(); CreatWingAvatar(); setNeedNum_stage(); //WingsData sData = wModel.dicWingsData[showStage]; //ShowTitle(sData); }
public void GetAllWingsXMLData() { dicWingsData = new Dictionary <int, WingsData>(); if (wingUpItem == null) { wingUpItem = new Dictionary <string, uint> { ["levelItemId"] = XMLMgr.instance.GetSXML("wings.level_item").getUint("item_id"), ["stageItemId"] = XMLMgr.instance.GetSXML("wings.stage_item").getUint("item_id") } } ; List <SXML> wings = WingXML.GetNodeList("wing_stage"); for (int i = 0; i < wings.Count; i++) { WingsData _data = new WingsData(); _data.stage = wings[i].getInt("stage_id"); _data.spriteFile = "icon_wing_" + wings[i].getString("icon"); _data.stageCostGold = wings[i].getUint("cost_gold"); _data.stageCrystalMin = wings[i].getUint("crystal_min"); _data.stageCrystalMax = wings[i].getUint("crystal_max"); _data.stageCrystalStep = wings[i].getUint("crystal_step"); _data.stageRateMin = wings[i].getUint("rate_min"); _data.stageRateMax = wings[i].getUint("rate_max"); _data.wingName = wings[i].getString("name"); dicWingsData[_data.stage] = _data; } }
private void ExitStar() { aniExp.SetBool("Star", false); int curStage = wingModel.Stage; WingsData sData = wingModel.dicWingsData[curStage]; ShowTitle(sData); RefreshStar(wingModel.Level); RefreshAtt(wingModel.Stage, wingModel.Level); RefreshCostInfo(wingModel.Stage, wingModel.Level); RefreshPanel(wingModel.Stage, wingModel.Level); ShowPage(pageIndex); ExpBarHandle = null; }
private void ExitStar() { this.aniExp.SetBool("Star", false); int stage = this.wingModel.Stage; WingsData data = this.wingModel.dicWingsData[stage]; this.ShowTitle(data); this.RefreshStar(this.wingModel.Level); this.RefreshAtt(this.wingModel.Stage, this.wingModel.Level); this.RefreshCostInfo(this.wingModel.Stage, this.wingModel.Level); this.RefreshPanel(this.wingModel.Stage, this.wingModel.Level); this.ShowPage(this.pageIndex); this.ExpBarHandle = null; }
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); }
public override void onShowed() { a3_wing_skin.instance = this; (CrossApp.singleton.getPlugin("processManager") as processManager).addProcess(this.process, false); BaseProxy <A3_WingProxy> .getInstance().addEventListener(0u, new Action <GameEvent>(this.OnLevelExpChange)); BaseProxy <A3_WingProxy> .getInstance().addEventListener(1u, new Action <GameEvent>(this.OnStageChange)); BaseProxy <A3_WingProxy> .getInstance().addEventListener(2u, new Action <GameEvent>(this.OnLevelExpChange)); BaseProxy <A3_WingProxy> .getInstance().addEventListener(3u, new Action <GameEvent>(this.OnShowStageChange)); BaseProxy <A3_WingProxy> .getInstance().addEventListener(4u, new Action <GameEvent>(this.OnStageNO)); int stage = this.wingModel.Stage; int level = this.wingModel.Level; int showStage = this.wingModel.ShowStage; this.ShowStage_yuxuan = 0; this.curWing = this.wingModel.dicWingsData[stage]; WingsData data = this.wingModel.dicWingsData[stage]; this.InitExpSlider(this.wingModel.Stage, this.wingModel.Level, this.wingModel.Exp); this.CreatAllWingsIcon(stage); this.ShowTitle(data); this.RefreshAtt(stage, level); this.RefreshStar(level); this.RefreshCostInfo(this.wingModel.Stage, this.wingModel.Level); this.OnSetIconBGImage(showStage); this.OnStageSliderSetting(this.curWing); this.RefreshPanel(stage, level); this.ShowPage(this.pageIndex); this.InitExpState(); InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR); base.transform.FindChild("ig_bg_bg").gameObject.SetActive(false); base.onShowed(); GRMap.GAME_CAMERA.SetActive(false); this.CreatWingAvatar(); }
private void OnStageChange(GameEvent e) { int stage = this.wingModel.Stage; WingsData wingsData = this.wingModel.dicWingsData[stage]; this.ShowTitle(wingsData); this.RefreshCostInfo(this.wingModel.Stage, this.wingModel.Level); this.RefreshPanel(this.wingModel.ShowStage, this.wingModel.Level); this.ShowPage(this.pageIndex); this.RefreshAtt(this.wingModel.Stage, this.wingModel.Level); this.RefreshStar(this.wingModel.Level); this.OnUnLockNweStage(); this.InitExpSlider(this.wingModel.Stage, this.wingModel.Level, 0); this.costItem = (int)wingsData.stageCrystalMin; this.textStageCostItemSum.text = this.costItem.ToString(); this.neednum_stage = this.costItem; this.success.gameObject.SetActive(true); this.sliderStage.value = 0f; this.success.Play("wing_jjsuccess", -1, 0f); this.curWing = this.wingModel.dicWingsData[stage]; this.OnStageSliderSetting(this.curWing); this.DisposeAvatar(); this.CreatWingAvatar(); }
//滑动条设置 private void OnStageSliderSetting(WingsData data) { OnStageUpRateChange(sliderStage.value); }
//名字/等级/阶级变化 private void ShowTitle(WingsData data) { textName.text = data.wingName; textLevel.text = "LV " + wingModel.Level; textStage.text = "(" + wingModel.Stage + ContMgr.getCont("a3_auction_jie") + ")"; }
private void ShowTitle(WingsData data) { this.textName.text = data.wingName; this.textLevel.text = "LV " + this.wingModel.Level; this.textStage.text = "(" + this.wingModel.Stage + "阶)"; }