/// <summary> /// 初始化副本信息 /// </summary> private void initFuBenInfo() { initUserStar(); initStarMultiple(); FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(() => { port.info(gotoTeamPrepare, ChapterType.PRACTICE); }, ChapterType.WAR); }
/// <summary> /// 断线重连 /// </summary> public override void OnNetResume() { base.OnNetResume(); FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(updateTimes, ChapterType.ACTIVITY_CARD_EXP); }
private void intoFuben() { FuBenGetCurrentFPort port = FPortManager.Instance.getFPort("FuBenGetCurrentFPort") as FuBenGetCurrentFPort; port.getInfo((bool b) => { if (b) { UiManager.Instance.openDialogWindow <MessageWindow> ((win) => { win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("teamEdit_err03"), LanguageConfigManager.Instance.getLanguage("winLinkErr01"), (msgHandle) => { if (msgHandle.buttonID == MessageHandle.BUTTON_RIGHT) { UiManager.Instance.clearWindows(UiManager.Instance.getWindow <MainWindow> ()); FuBenManagerment.Instance.inToFuben(); } }); }); } else { if (curruntSid == TOWER_SID) { FuBenInfoFPort _port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; _port.info(intoTowerFuben, ChapterType.TOWER_FUBEN); } else if (curruntSid == WARCHOOSE_SID) { FuBenInfoFPort _port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; _port.info(() => { if (FuBenManagerment.Instance.getWarChapter() == null) { return; } //添加过程记录 FuBenManagerment.Instance.selectedChapterSid = FuBenManagerment.Instance.getWarChapter().sid; FuBenManagerment.Instance.selectedMapSid = 1; UiManager.Instance.openWindow <WarChooseWindow> (); }, ChapterType.WAR); } else if (curruntSid == TEAMPREPARE_SID) { FuBenInfoFPort _port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; _port.info(() => { FuBenManagerment.Instance.selectedChapterSid = FuBenManagerment.Instance.getPracticeChapter().sid; FuBenManagerment.Instance.selectedMapSid = 1; UiManager.Instance.openWindow <TeamPrepareWindow> ((win) => { win.Initialize(FuBenManagerment.Instance.selectedChapterSid, TeamPrepareWindow.WIN_PRACTICE_ITEM_TYPE); }); }, ChapterType.PRACTICE); } else { initFuBenInfo(); } } }); }
private void initTopFuben() { //如果当前有挂机的副本 则进入 if (SweepManagement.Instance.hasSweepMission) { intoSweepMainWindow(); } else { initUserStar(); initStarMultiple(); FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(() => { port.info(getFubenCurrentInfo, ChapterType.PRACTICE); }, ChapterType.WAR); } }
//获得指定副本数据 private void initFubenByType(int type) { if (type != ChapterType.STORY) { FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(continueMission, type); } else { continueMission(); } }
void getContinueMission(bool b) { if (b) { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("towerShowWindow44")); }); } else { FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(intoTowerFuben, ChapterType.TOWER_FUBEN); } }
public override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); if (gameObj.name == "close") { finishWindow(); } else if (gameObj.name == "crusade") { GuideManager.Instance.doGuide(); FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(intoWarFuben, ChapterType.WAR); } else if (gameObj.name == "activity") { GuideManager.Instance.doGuide(); intoActivityFuben(); } else if (gameObj.name == "practice") { GuideManager.Instance.doGuide(); intoPracticeFuben(); } else if (gameObj.name == "clmbTower") //进入爬塔界面 { if (UserManager.Instance.self.getUserLevel() < CommandConfigManager.Instance.getTowerLimitLevel()) { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("OneOnOneBoss_level_limit")); }); MaskWindow.UnlockUI(); return; } FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(intoTowerFuben, ChapterType.TOWER_FUBEN); } else if (gameObj.name == "oneOnOneBoss") //进入单挑boss界面 { if (UserManager.Instance.self.getUserLevel() < CommandConfigManager.Instance.getOneOnOneBossLimitLv()) { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("OneOnOneBoss_level_limit")); }); MaskWindow.UnlockUI(); return; } UiManager.Instance.openWindow <OneOnOneBossWindow>(); //TextTipWindow.Show (Language ("S0360")); } else if (gameObj.name == "lastBattle") { GuideManager.Instance.doFriendlyGuideEvent(); if (UserManager.Instance.self.getUserLevel() < CommandConfigManager.Instance.lastBattleData.openLevel) { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("OneOnOneBoss_level_limit")); }); MaskWindow.UnlockUI(); return; } LastBattleInitFPort init = FPortManager.Instance.getFPort("LastBattleInitFPort") as LastBattleInitFPort; init.lastBattleInitAccess(() => { UiManager.Instance.openWindow <LastBattleWindow>(); }); } else if (gameObj.name == "zhuXianBtn") { showZhuXianContent(); } else if (gameObj.name == "huoDongBtn") { showHuoDongContent(); } else { ChapterSelectItemView item = gameObj.GetComponent <ChapterSelectItemView> (); if (item != null) { GuideManager.Instance.doGuide(); FuBenManagerment.Instance.selectedChapterSid = item.data.sid; FuBenManagerment.Instance.selectedMapSid = item.data.missions [0]; UiManager.Instance.openWindow <MissionChooseWindow> (); } } }
//初始化活动信息,从第一个开始循环获取,获取完全部信息后显示界面 private void initActivityInfo() { FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(activityBack, ChapterType.ACTIVITY_CARD_EXP); }
//初始化副本信息.获得玩家历史数据 private void initFubenData() { FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(loadData, ChapterType.STORY); }
/// <summary> /// 获得指定副本数据 /// </summary> private void initFubenByType(int type) { FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(continueMission, type); }
private void openWindowArgs(WindowLinkSample sample, WindowBase win) { if (sample.windowArgs.Length <= 0) { return; } if (win is NoticeWindow) { (win as NoticeWindow).entranceId = NoticeSampleManager.Instance.getNoticeSampleBySid(StringKit.toInt(sample.windowArgs [0])).entranceId; (win as NoticeWindow).updateSelectButton(StringKit.toInt(sample.windowArgs [0])); } else if (win is GuildMainWindow) { (win as GuildMainWindow).initWindow(); } else if (win is TeamPrepareWindow) { FuBenInfoFPort port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; port.info(() => { FuBenManagerment.Instance.selectedChapterSid = FuBenManagerment.Instance.getPracticeChapter().sid; FuBenManagerment.Instance.selectedMapSid = 1; (win as TeamPrepareWindow).Initialize(FuBenManagerment.Instance.selectedChapterSid, TeamPrepareWindow.WIN_PRACTICE_ITEM_TYPE); }, ChapterType.PRACTICE); } else if (win is IntensifyCardWindow) { if (sample.sid == INTENSIFY_CARD_EVLOUTION) { IntensifyCardManager.Instance.setMainCard(ArmyManager.Instance.getActiveArmy().getLeastCombatCardExistMain()); } else { IntensifyCardManager.Instance.setMainCard(ArmyManager.Instance.getActiveArmy().getLeastCombatCard()); } (win as IntensifyCardWindow).initWindow(StringKit.toInt(sample.windowArgs [0])); } else if (win is HonorWindow) { (win as HonorWindow).updateInfo(); } else if (win is GoddessWindow) { // (win as GoddessWindow).initWin (); } else if (win is ExChangeWindow) { (win as ExChangeWindow).setDefaultIndex(StringKit.toInt(sample.windowArgs [0])); } else if (win is ShopWindow) { int type = StringKit.toInt(sample.windowArgs [0]); ShopWindow shopWindow = win as ShopWindow; /** 神秘商城 */ if (type == ShopWindow.TAP_MYSTICAL_CONTENT) { shopWindow.setTitle(LanguageConfigManager.Instance.getLanguage("shop_mystical")); shopWindow.init(ShopWindow.TAP_MYSTICAL_CONTENT); } /** 钻石商城 */ else if (type == ShopWindow.TAP_SHOP_CONTENT) { shopWindow.setTitle(LanguageConfigManager.Instance.getLanguage("shop02")); shopWindow.init(ShopWindow.TAP_SHOP_CONTENT); } } }
private void onClickGo(GameObject obj) { switch (mSample.windowLinkSid) { case 90090: //炼金术界面 { if (UserManager.Instance.self.getUserLevel() >= mSample.showLv) { if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)]) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString())); return; } if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2])) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05")); return; } win.entranceId = NoticeSampleManager.Instance.getNoticeSampleBySid(NoticeType.ALCHEMY_SID).entranceId; win.updateSelectButton(NoticeType.ALCHEMY_SID); win.initTopButton(); MaskWindow.UnlockUI(); } else { showTip(mSample.showLv); } break; } case 90091: //钻石召唤界面 { if (UserManager.Instance.self.getUserLevel() >= mSample.showLv) { if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)]) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString())); return; } if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2])) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05")); return; } UiManager.Instance.openWindow <LuckyDrawDetailWindow> ((win) => { win.setLuckyDraw(LuckyDrawManagerment.Instance.getLuckyDrawBySid(81001)); }); } else { showTip(mSample.showLv); } break; } case 90092: //女神摇一摇界面 { if (UserManager.Instance.self.getUserLevel() >= mSample.showLv) { if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)]) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString())); return; } if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2])) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05")); return; } win.entranceId = NoticeSampleManager.Instance.getNoticeSampleBySid(NoticeType.GODDNESS_SHAKE_SID).entranceId; win.updateSelectButton(NoticeType.GODDNESS_SHAKE_SID); win.initTopButton(); MaskWindow.UnlockUI(); } else { showTip(mSample.showLv); } break; } case 90093: //讨伐界面 { if (UserManager.Instance.self.getUserLevel() >= mSample.showLv && UserManager.Instance.self.getVipLevel() >= 3) { //Mathf.Min((task.index-1)*2+1,mSample.condition.conditions.Length -1) if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)]) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString())); return; } if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2])) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05")); return; } FuBenGetCurrentFPort port = FPortManager.Instance.getFPort("FuBenGetCurrentFPort") as FuBenGetCurrentFPort; port.getInfo((bool b) => { if (b) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_03")); return; } else { UiManager.Instance.openWindow <WarChooseWindow> (); return; } }); } else { showTip(mSample.showLv, 3); } break; } case 90094: //高级裂魂界面 { if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)]) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString())); return; } if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2])) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05")); return; } if (UserManager.Instance.self.getUserLevel() >= mSample.showLv && UserManager.Instance.self.getVipLevel() >= CommonConfigSampleManager.Instance.getSampleBySid <DailyRebateSample>(6).getTimesInt(1)) { UiManager.Instance.openWindow <StarSoulWindow> ((win) => { win.init(1); }); } else { showTip(mSample.showLv, 4); } break; } case 90095: //神秘商店 { if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)]) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString())); return; } if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2])) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05")); return; } if (UserManager.Instance.self.getUserLevel() >= mSample.showLv) { UiManager.Instance.openWindow <ShopWindow> ((win) => { win.setTitle(LanguageConfigManager.Instance.getLanguage("shop_mystical")); win.init(ShopWindow.TAP_MYSTICAL_CONTENT); }); } else { showTip(mSample.showLv); } break; } case 90096: //神魔宝库 { if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)]) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString())); return; } if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2])) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05")); return; } FuBenGetCurrentFPort port = FPortManager.Instance.getFPort("FuBenGetCurrentFPort") as FuBenGetCurrentFPort; port.getInfo((bool b) => { if (b) { UiManager.Instance.openDialogWindow <MessageWindow> ((win) => { win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("teamEdit_err03"), LanguageConfigManager.Instance.getLanguage("winLinkErr01"), (msgHandle) => { if (msgHandle.buttonID == MessageHandle.BUTTON_RIGHT) { UiManager.Instance.clearWindows(UiManager.Instance.getWindow <MainWindow> ()); FuBenManagerment.Instance.inToFuben(); } }); }); } else { if (UserManager.Instance.self.getUserLevel() >= mSample.showLv) { FuBenInfoFPort _port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort; _port.info(intoTowerFuben, ChapterType.TOWER_FUBEN); } else { showTip(mSample.showLv); } return; } }); break; } } }