public override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); if (BattleManager.isWaitForBattleData) { MaskWindow.UnlockUI(); return; } if (gameObj.name == "close") { UiManager.Instance.openWindow <MainWindow> ((win) => { SweepManagement.Instance.clearPvpAward(); }); } else if (gameObj.name == "buttonOver") { if (PvpInfoManagerment.Instance.getPvpTime(null) > 0 || SweepManagement.Instance.getPvpNum() > 0) { UiManager.Instance.openDialogWindow <MessageWindow> ( (win) => { string info = LanguageConfigManager.Instance.getLanguage("sweepTip_07"); win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), info, over); }); } else { finishSweep(); } } else if (gameObj.name == "pkButton") { BattleGlobal.pvpMode = EnumPvp.sweep; PvpInfo pvpInfo = PvpInfoManagerment.Instance.getPvpInfo(); if (pvpInfo != null && PvpInfoManagerment.Instance.getPvpTime(null) > 0) { PvpRankInfoFPort port1 = FPortManager.Instance.getFPort <PvpRankInfoFPort> (); port1.access(() => { startTimer(); PvpInfoManagerment.Instance.setPvpType(PvpInfo.TYPE_PVP_SWEEP); UiManager.Instance.openDialogWindow <PvpInfoWindow> (); }); } else { SweepPKFPort port = FPortManager.Instance.getFPort <SweepPKFPort> (); port.getPK(() => { PvpInfoManagerment.Instance.clearDate(); PvpInfoManagerment.Instance.initPvpEvent(); PvpInfoManagerment.Instance.setPvpType(PvpInfo.TYPE_PVP_SWEEP); SweepManagement.Instance.usePvpNum(); PvpRankInfoFPort port1 = FPortManager.Instance.getFPort <PvpRankInfoFPort> (); port1.access(() => { startTimer(); PvpInfoManagerment.Instance.setPvpType(PvpInfo.TYPE_PVP_SWEEP); UiManager.Instance.openDialogWindow <PvpInfoWindow> (); }); }); } } else if (gameObj.name == "starButton") { UiManager.Instance.openWindow <BattleDrawWindow> (); } }
public override void buttonEventBase(GameObject gameObj) { if (guideGuaji.activeInHierarchy) { guideGuaji.SetActive(false); } base.buttonEventBase(gameObj); if (gameObj.name == "stop") { MissionInfoManager.Instance.autoGuaji = false; stopButton.gameObject.SetActive(false); return; } if (BattleManager.isWaitForBattleData) { MaskWindow.UnlockUI(); return; } if (gameObj.name == "move") { if (!MissionManager.instance.isLoadFinish) { MaskWindow.UnlockUI(); return; } if (MissionInfoManager.Instance.mission != null && MissionInfoManager.Instance.mission.sid == 41005 && FuBenManagerment.Instance.isNewMission(ChapterType.STORY, 41005) && GuideManager.Instance.loadTimes(51007985) < 1) { GuideManager.Instance.saveTimes(51007985); } if (MissionManager.instance.AutoRunIndex != -1) { MissionManager.instance.AutoRunStart(); return; } nvshen(); HeroGuideManager.Instance.doBegin = true; MissionManager.instance.moveForward(); } // 放弃副本 else if (gameObj.name == "ouit") { UiManager.Instance.openDialogWindow <MessageWindow> ( (win) => { win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), LanguageConfigManager.Instance.getLanguage("s0270"), outFuBen); } ); } //离开副本(save) else if (gameObj.name == "close") { //主窗口有引导,不给直接返回,最好从退出副本返回 // if(!GuideManager.Instance.isGuideComplete()) { // UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("missionMain03")); // MaskWindow.UnlockUI(); // return; // } //提前预判是否完成了一次性指引,没有就不给返回,先引导了再说 if (!GuideManager.Instance.isOnceGuideComplete(GuideGlobal.ONCEGUIDE_BACK)) { GuideManager.Instance.onceGuideEvent(GuideGlobal.ONCEGUIDE_BACK); MaskWindow.UnlockUI(); return; } LoadingWindow.isShowProgress = false; ClmbTowerManagerment.Instance.turnSpriteData = null; UiManager.Instance.switchWindow <EmptyWindow> ( (win) => { MissionManager.instance.cleanCache(); ScreenManager.Instance.loadScreen(1, MissionManager.instance.missionClean, GameManager.Instance.saveMission); } ); } else if (gameObj.name == "team") { FuBenGetSelfHpFPort port = FPortManager.Instance.getFPort("FuBenGetSelfHpFPort") as FuBenGetSelfHpFPort; port.getInfo(showTeamViewInMissionWindow); } else if (gameObj.name == "PK") { PvpRankInfoFPort fport = FPortManager.Instance.getFPort("PvpRankInfoFPort") as PvpRankInfoFPort; fport.access(getRankInfo); } else if (gameObj.name == "luckyButton") { UiManager.Instance.openWindow <BattleDrawWindow> (); //hideWindow (); } else if (gameObj.name == "levelupAwardButton") { UiManager.Instance.openDialogWindow <LevelupRewardWindow> ((win) => { win.init(updateLevelupRewardButton); }); } else if (gameObj.name == UI_ChatBtn.name) { UiManager.Instance.openWindow <ChatWindow> ((win) => { win.initChatWindow(ChatManagerment.Instance.sendType - 1); }); } else if (gameObj.name == "party") { UiManager.Instance.openDialogWindow <MessageWindow> ((win) => { win.initWindow(1, LanguageConfigManager.Instance.getLanguage("s0040"), null, LanguageConfigManager.Instance.getLanguage("total_actionisnotopen"), null); }); } else if (gameObj.name == "guaji") { if (!MissionManager.instance.isLoadFinish) { MaskWindow.UnlockUI(); return; } UiManager.Instance.openDialogWindow <AutoMoveSetWindow>((win) => { win.dialogCloseUnlockUI = false; }); } else if (gameObj.name == "heroShowPoint") { HeroGuideSample heroGuidee = null; if (HeroGuideManager.Instance.checkHaveGuid()) { heroGuidee = HeroGuideManager.Instance.getCurrectSample(MissionInfoManager.Instance.mission.getPlayerPointIndex()); } else if (HeroGuideManager.Instance.checkHaveExistGuid()) { heroGuidee = HeroGuideManager.Instance.getOldSample(); } if (heroGuidee != null) { if (heroGuidee.prizeSample[0].type == 5) { CardBookWindow.Show(CardManagerment.Instance.createCard(heroGuidee.prizeSample[0].pSid), CardBookWindow.SHOW, null); } else if (heroGuidee.prizeSample[0].type == 6) { UiManager.Instance.openWindow <BeastAttrWindow>((win) => { win.Initialize(getFistGoddess(heroGuidee.prizeSample[0].pSid), 4); }); } else if (heroGuidee.prizeSample[0].type == 7) { UiManager.Instance.openDialogWindow <MainCardSurmountShowWindow>((win) => { win.init(StringKit.toInt(heroGuidee.prizeSample[0].num) + 3); }); } } else { MaskWindow.UnlockUI(); } } else if (gameObj.name == "addPvePoint") { UiManager.Instance.openDialogWindow <PveUseWindow>(); } else { MaskWindow.UnlockUI(); } }