/** 挑战 */ public void challenge() { /** 不在公会战战斗期间 */ if (!GuildFightSampleManager.Instance().isFightTime()) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_39")); UiManager.Instance.BackToWindow <GuildFightMainWindow> (); return; } /** 行动力不足 */ if (UserManager.Instance.self.guildFightPower < challengeSample.getExpends()) { goToGetPower(); return; } //判断队伍6(公会战队伍)是否存在 if (ArmyManager.Instance.getArmy(6) == null) { GetGuildFightTeamFPort fport = FPortManager.Instance.getFPort <GetGuildFightTeamFPort> (); fport.access(sendChallengeMsg); } else { sendChallengeMsg(); } }
public override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); /** 祝福 */ if (gameObj.name == "ButtonWish") { wish(); } /** 鼓舞 */ else if (gameObj.name == "ButtonInspire") { inspire(); } /** 队伍编辑 */ else if (gameObj.name == "ButtonTeamEdit") { teamEdit(); } else if (gameObj.name == "close") { this.finishWindow(); } else if (gameObj.name == "ButtonTeam") { if (!GuideManager.Instance.isGuideComplete()) { ArmyManager.Instance.cleanAllEditArmy(); } GuideManager.Instance.doGuide(); //判断队伍6(公会战队伍)是否存在 if (ArmyManager.Instance.getArmy(6) == null) { GetGuildFightTeamFPort fport = FPortManager.Instance.getFPort <GetGuildFightTeamFPort> (); fport.access(openTeamEmtpyWindow); } else { openTeamEmtpyWindow(); } } }
public override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); if (gameObj.name == "buttonHelp") { UiManager.Instance.openDialogWindow <GeneralDesWindow> ((win) => { win.initialize(LanguageConfigManager.Instance.getLanguage("GuildArea_15"), LanguageConfigManager.Instance.getLanguage("GuildArea_11"), null); }); } else if (gameObj.name == "ButtonRank") { UiManager.Instance.openWindow <GuildAreaHurtRankWindow> (); } else if (gameObj.name == "close") { this.finishWindow(); } else if (gameObj.name == "ButtonGetPower") { /** 行动力已满 */ if (UserManager.Instance.self.isGuildFightPowerMax()) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_23")); MaskWindow.UnlockUI(); return; } /** 领取后行动力超出 */ else if (UserManager.Instance.self.guildFightPower + GuildFightSampleManager.Instance().getPowerNum() > UserManager.Instance.self.guildFightPowerMax) { string des = Language("GuildArea_47"); MessageWindow.ShowConfirm(des, (msg) => { if (msg.msgEvent == msg_event.dialogOK) { GuildGetWarPowerFport port = FPortManager.Instance.getFPort("GuildGetWarPowerFport") as GuildGetWarPowerFport; port.access((power) => { int addPower = power - UserManager.Instance.self.guildFightPower; UserManager.Instance.self.guildFightPower = power; data.get_power = false; buttonGetPower.disableButton(!data.get_power); updatePower(); UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_34", addPower.ToString())); }); } }); MaskWindow.UnlockUI(); return; } /** 领取行动值 */ else { GuildGetWarPowerFport port = FPortManager.Instance.getFPort("GuildGetWarPowerFport") as GuildGetWarPowerFport; port.access((power) => { int addPower = power - UserManager.Instance.self.guildFightPower; UserManager.Instance.self.guildFightPower = power; data.get_power = false; buttonGetPower.disableButton(!data.get_power); updatePower(); UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_34", addPower.ToString())); }); } } else if (gameObj.name == "ButtonAward") { UiManager.Instance.openDialogWindow <GuildFightAwardShowWindow> (); } else if (gameObj.name == "noticeButton") { if (GuildManagerment.Instance.getGuild().job == GuildJobType.JOB_PRESIDENT || GuildManagerment.Instance.getGuild().job == GuildJobType.JOB_VICE_PRESIDENT) { UiManager.Instance.openDialogWindow <GuildNoticeEditWindow> ((win) => { win.updateInput(); }); } else { MaskWindow.UnlockUI(); } } else if (gameObj.name == "chatButton") { UiManager.Instance.openWindow <ChatWindow> ((win) => { win.initChatWindow(ChatManagerment.Instance.sendType - 1); }); if (MainWindow.sort > ChatManagerment.Instance.getAllChat().Count) { ++MainWindow.sort; } else { MainWindow.sort = ChatManagerment.Instance.getAllChat().Count; } } else if (gameObj.name == "buttonInfo") // 详情 { tweenerMessageState = false; tweenMessage.gameObject.SetActive(true); tweenerMessageState = true; tweenerMessageGroupIn(tweenMessage); } else if (gameObj.name == "buttonCloseInfo") // 关闭详情 { tweenerMessageState = false; tweenerMessageGroupOut(tweenMessage); } /** 复活 */ else if (gameObj.name == "ButtonRevive") { //SendRivive (); } else if (gameObj.name == "ButtonCourage") { if (data.state == NOTOPEN) { UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_35")); } else { /** 入会不满1天 */ if (!GuildManagerment.Instance.isCanJoinGuildFight()) { UiManager.Instance.createMessageLintWindow(Language("GuildArea_41")); return; } if (data.areas.Count > 0) { foreach (GuildAreaPreInfo info in data.areas) { if (info.uid == UserManager.Instance.self.guildId) { GuildGetAreaFPort port = FPortManager.Instance.getFPort("GuildGetAreaFPort") as GuildGetAreaFPort; port.access(info.uid, info.server, (guildAreaData) => { UiManager.Instance.openDialogWindow <GuildFightCourageWindow> ((win) => { win.initializeInfo(guildAreaData); }); }); return; } } } else { MaskWindow.UnlockUI(); } } } else if (gameObj.name == "ButtonIntegralRank") { UiManager.Instance.openDialogWindow <GuildFightClassWindow> ((win) => { win.Intialize(); }); } else if (gameObj.name == "ButtonTeam") { if (!GuideManager.Instance.isGuideComplete()) { ArmyManager.Instance.cleanAllEditArmy(); } GuideManager.Instance.doGuide(); //判断队伍6(公会战队伍)是否存在 if (ArmyManager.Instance.getArmy(6) == null) { GetGuildFightTeamFPort fport = FPortManager.Instance.getFPort <GetGuildFightTeamFPort> (); fport.access(openTeamEmtpyWindow); } else { openTeamEmtpyWindow(); } } }