private void _initEvent(bool regist) { if (regist) { ZEventSystem.Register(EventConst.OnFightUnitMove, this, "OnFightUnitMove"); ZEventSystem.Register(EventConst.OnFightUnitSkill, this, "OnFightUnitSkill"); ZEventSystem.Register(EventConst.OnFightUnitDie, this, "OnFightUnitDie"); ZEventSystem.Register(EventConst.OnPlayHitAnim, this, "OnPlayHitAnim"); ZEventSystem.Register(EventConst.OnFightOver, this, "OnFightOver"); ZEventSystem.Register(EventConst.OnFightUnitTakenEffect, this, "OnFightUnitTakenEffect"); ZEventSystem.Register(EventConst.OnFightUnitAddBuff, this, "OnFightUnitAddBuff"); ZEventSystem.Register(EventConst.OnRequestUnitPause, this, "OnRequestUnitPause"); ZEventSystem.Register(EventConst.ForceDestroyView, this, "ForceDestroyView"); ZEventSystem.Register(EventConst.OnFightUnitInterrupt, this, "OnFightUnitInterrupt"); //ZEventSystem.Register(EventConst.OnFightUnitTakeEffect, this, "OnFightUnitTakeEffect"); ZEventSystem.Register(EventConst.OnSkillTakeEffect, this, "OnSkillTakeEffect"); } else { ZEventSystem.DeRegister(EventConst.OnFightUnitMove, this); ZEventSystem.DeRegister(EventConst.OnFightUnitSkill, this); ZEventSystem.DeRegister(EventConst.OnFightUnitDie, this); ZEventSystem.DeRegister(EventConst.OnPlayHitAnim, this); ZEventSystem.DeRegister(EventConst.OnFightOver, this); ZEventSystem.DeRegister(EventConst.OnFightUnitTakenEffect, this); ZEventSystem.DeRegister(EventConst.OnFightUnitAddBuff, this); ZEventSystem.DeRegister(EventConst.OnRequestUnitPause, this); ZEventSystem.DeRegister(EventConst.ForceDestroyView, this); ZEventSystem.DeRegister(EventConst.OnFightUnitInterrupt, this); //ZEventSystem.DeRegister(EventConst.OnFightUnitTakeEffect, this); ZEventSystem.DeRegister(EventConst.OnSkillTakeEffect, this); } }
public void Clear() { //反注册事件 clearFightState(true); ZEventSystem.DeRegister(EventConst.OnFightUnitDie, this); ZEventSystem.DeRegister(EventConst.OnFightStateChange, this); ZEventSystem.DeRegister(EventConst.OnUnitMoveOver, this); ZEventSystem.DeRegister(EventConst.OnRequestUnitPause, this); ZEventSystem.DeRegister(EventConst.OnFightMaskOver, this); ZEventSystem.DeRegister(EventConst.OnGamePause, this); ProcessCtrl.Instance.RemoveUpdate(this); Fighters.Clear(); EnemyFighters.Clear(); AllFighters.Clear(); if (aStarFinder != null) { aStarFinder.Clear(); } if (BulletMgrObj != null) { BulletMgrObj.Clear(); } MapMgr.Instance.Clear(); EffectMgr.Instance.Clear(); DropMgrObj = null; CamMgrObj = null; Time.timeScale = 1; IsAutoFight = false; UID = 0; }
public void Init(bool open) { if (open) { ZEventSystem.Register(EventConst.OnMsgOnMain, this, "OnMain"); this.mView.Random_btn.onClick.AddListener(delegate() { this.mView.GetName(); }); this.mView.Select_btn.onClick.AddListener(delegate() { this.mView.Switch(true); }); this.mView.Select1_btn.onClick.AddListener(delegate() { this.mView.Switch(false); }); this.mView.GoGame_btn.onClick.AddListener(delegate() { OnSelectPer(); }); this.mView.Man_tog.onValueChanged.AddListener((bool value) => this.mView.CutRole(true, this.mView.Man_tog.gameObject)); this.mView.Man1_tog.onValueChanged.AddListener((bool value) => this.mView.CutRole(true, this.mView.Man1_tog.gameObject)); this.mView.Woman_tog.onValueChanged.AddListener((bool value) => this.mView.CutRole(false, this.mView.Woman_tog.gameObject)); this.mView.Woman1_tog.onValueChanged.AddListener((bool value) => this.mView.CutRole(false, this.mView.Woman1_tog.gameObject)); } else { ZEventSystem.DeRegister(EventConst.OnMsgOnMain, this); this.mView.Select1_btn.onClick.RemoveAllListeners(); this.mView.Select_btn.onClick.RemoveAllListeners(); this.mView.GoGame_btn.onClick.RemoveAllListeners(); this.mView.Random_btn.onClick.RemoveAllListeners(); this.mView.Man_tog.onValueChanged.RemoveAllListeners(); this.mView.Woman_tog.onValueChanged.RemoveAllListeners(); } }
/// <summary> /// 战斗单位移动到targetpos事件,主要判断是不是所有单位都到位了 /// </summary> /// <param name="unit"></param> public void OnUnitMoveOver(FightUnit unit) { if (unit == null) { EDebug.LogError("FightLogic.OnUnitOver failed, unit is null"); return; } unit.State = FightUnitState.Idle; //如果所有的单位都移动到指定位置,移除事件,进入下一状态 if (State == FightState.Prepare) { bool allUnitIdle = true; for (int idx = 0; idx < AllFighters.Count; ++idx) { FightUnit fightUnit = AllFighters[idx]; if (fightUnit.IsDead) { continue; } if (fightUnit.State != FightUnitState.Idle) { allUnitIdle = false; break; } } //所有单位都到达了指定位置 if (allUnitIdle) { ZEventSystem.DeRegister(EventConst.OnUnitMoveOver, this); State = FightState.Fight; } } }
public override bool OnClose() { base.OnClose(); this.mView.Head.onClick.RemoveAllListeners(); ZEventSystem.DeRegister(EventConst.UpdateData, this); return(true); }
public void Init(bool open) { if (open) { ZEventSystem.Register(EventConst.OnGetRegisterSky, this, "OnGetRegisterSky"); this.mView.one_btn.onClick.AddListener(delegate() { this.mView.SkyNum(1001); }); this.mView.tow_btn.onClick.AddListener(delegate() { this.mView.SkyNum(1002); }); this.mView.three_btn.onClick.AddListener(delegate() { this.mView.SkyNum(1003); }); this.mView.four_btn.onClick.AddListener(delegate() { this.mView.SkyNum(1004); }); this.mView.five_btn.onClick.AddListener(delegate() { this.mView.SkyNum(1005); }); this.mView.six_btn.onClick.AddListener(delegate() { this.mView.SkyNum(1006); }); this.mView.seven_btn.onClick.AddListener(delegate() { this.mView.SkyNum(1007); }); this.mView.Affirm_btn.onClick.AddListener(delegate() { this.mView.GetAward(); }); // this.mView.Woman1_tog.onValueChanged.AddListener((bool value) => this.mView.CutRole(false, this.mView.Woman1_tog.gameObject)); } else { ZEventSystem.DeRegister(EventConst.OnGetRegisterSky, this); // this.mView.Select1_btn.onClick.RemoveAllListeners(); // this.mView.Woman_tog.onValueChanged.RemoveAllListeners(); this.mView.one_btn.onClick.RemoveAllListeners(); this.mView.tow_btn.onClick.RemoveAllListeners(); this.mView.three_btn.onClick.RemoveAllListeners(); this.mView.four_btn.onClick.RemoveAllListeners(); this.mView.five_btn.onClick.RemoveAllListeners(); this.mView.six_btn.onClick.RemoveAllListeners(); this.mView.seven_btn.onClick.RemoveAllListeners(); this.mView.Affirm_btn.onClick.RemoveAllListeners(); } }
private void _initAdditionEvent(bool open) { if (open) { foreach (var h in this.mView.Heads) { ZEventSystem.Register(EventConst.OnFightUnitHpChange, h.Value, "OnFightUnitHpChange"); ZEventSystem.Register(EventConst.OnFightUnitVigourChange, h.Value, "OnFightUnitVigourChange"); ZEventSystem.Register(EventConst.OnFightStateChange, h.Value, "OnFightStateChange"); ZEventSystem.Register(EventConst.OnFightTargetChange, h.Value, "OnFightTargetChange"); ZEventSystem.Register(EventConst.OnFightUnitDie, h.Value, "OnFightUnitDie"); h.Value.fightHero_btn.onClick.AddListener(delegate() { this.OnHeadClick(h.Value.Unit); }); } } else { foreach (var h in this.mView.Heads) { ZEventSystem.DeRegister(EventConst.OnFightUnitHpChange, h.Value); ZEventSystem.DeRegister(EventConst.OnFightUnitVigourChange, h.Value); ZEventSystem.DeRegister(EventConst.OnFightStateChange, h.Value); ZEventSystem.DeRegister(EventConst.OnFightTargetChange, h.Value); ZEventSystem.DeRegister(EventConst.OnFightUnitDie, h.Value); h.Value.fightHero_btn.onClick.RemoveAllListeners(); } } }
/// <summary> /// CLOSE调用 /// </summary> private void DRegisteEvent() { ZEventSystem.DeRegister(EventConst.REFRESHSIDE); ZEventSystem.DeRegister(EventConst.REFRESHLEFT); ZEventSystem.DeRegister(EventConst.REFRESHRIGHT); ZEventSystem.DeRegister(EventConst.TOTEMDATACHANGE); }
public void Clear() { _allBuff.Clear(); ZEventSystem.DeRegister(EventConst.OnFightUnitDie, this); ZEventSystem.DeRegister(EventConst.OnFightUnitHit, this); ZEventSystem.DeRegister(EventConst.OnFightUnitHpChange, this); ZEventSystem.DeRegister(EventConst.OnSkillTakeEffect, this); ZEventSystem.DeRegister(EventConst.OnFightUnitBooster, this); }
public void Close() { for (int i = 0, length = parent_trf.childCount; i < length; ++i) { DestroyImmediate(parent_trf.GetChild(0).gameObject); } ZEventSystem.DeRegister(EventConst.UPSTRENGTHENVIEW); ZEventSystem.Dispatch(EventConst.REFRESHLEFT); }
public void Close() { HeroInfo[] showList = Content_obj.GetComponentsInChildren <HeroInfo>(); for (int i = 0, count = showList.Length; i < count; ++i) { showList[i].Close(); showList[i].transform.SetParent(workerGo[(EWORKER)showList[i].Type].transform, false); } ZEventSystem.DeRegister(EventConst.HEROINFOCHANGE); }
public override bool OnClose() { base.OnClose(); ZEventSystem.DeRegister(EventConst.RefreshTimes); this.mView.ordinaryshop_btn.onClick.RemoveAllListeners(); this.mView.passbarrier_btn.onClick.RemoveAllListeners(); this.mView.competitive_btn.onClick.RemoveAllListeners(); this.mView.guildshop_btn.onClick.RemoveAllListeners(); return(true); }
public void OnOpenCompose() { Close(); if (select_trf.gameObject.activeInHierarchy) { select_trf.gameObject.SetActive(false); } SetProgress(progress); ZEventSystem.DeRegister(EventConst.ONOPENCOMPOSE); }
public void InitEvent(bool open) { if (open) { ZEventSystem.Register(EventConst.ShowAllHeros, this, "ShowAllHeros"); } else { ZEventSystem.DeRegister(EventConst.ShowAllHeros); } }
private void _InitChapter(bool open) { if (open) { this.mView.epic_tog.onValueChanged.AddListener((bool value) => this.mView.Epic()); this.mView.elite_tog.onValueChanged.AddListener((bool value) => this.mView.Elite()); this.mView.common_tog.onValueChanged.AddListener((bool value) => this.mView.Common()); this.mView.front_btn.onClick.AddListener(delegate() { this.mView.CutSectionName(true); }); this.mView.queen_btn.onClick.AddListener(delegate() { this.mView.CutSectionName(false); }); // this.mView.quit_btn.onClick.AddListener(delegate () { this.mView.BattleBtn(); }); //this.mView.Quit_btn.onClick.AddListener(delegate () { this.mView.CloseCustoms(); }); //this.mView.Star1_btn.onClick.AddListener(delegate () { this.mView.PassStage(1); }); //this.mView.Star2_btn.onClick.AddListener(delegate () { this.mView.PassStage(2); }); //this.mView.Star3_btn.onClick.AddListener(delegate () { this.mView.PassStage(3); }); //this.mView.buy_btn.onClick.AddListener(delegate () { this.mView.Expect(); }); //this.mView.operation_10_btn.onClick.AddListener(delegate () { this.mView.Expect(); }); //this.mView.operation_btn.onClick.AddListener(delegate () { this.mView.Expect(); }); //this.mView.embattle_btn.onClick.AddListener(delegate () { // UIFace.GetSingleton().Open(UIID.Stub, 0); //}); this.mView.Clear_4_btn.onClick.AddListener(delegate() { this.mView.OpenTreasure("Clear_4"); }); this.mView.Clear_8_btn.onClick.AddListener(delegate() { this.mView.OpenTreasure("Clear_8"); }); this.mView.Clear_12_btn.onClick.AddListener(delegate() { this.mView.OpenTreasure("Clear_12"); }); ZEventSystem.Register(EventConst.OnClose, this.mView, "CloseCustoms"); ZEventSystem.Register(EventConst.OpLevel, this, "OpLevel"); } else { ZEventSystem.DeRegister(EventConst.OpLevel, this); ZEventSystem.DeRegister(EventConst.OnClose, this.mView); this.mView.elite_tog.onValueChanged.RemoveAllListeners(); this.mView.common_tog.onValueChanged.RemoveAllListeners(); this.mView.front_btn.onClick.RemoveAllListeners(); this.mView.queen_btn.onClick.RemoveAllListeners(); this.mView.quit_btn.onClick.RemoveAllListeners(); //this.mView.Quit_btn.onClick.RemoveAllListeners(); //this.mView.Star1_btn.onClick.RemoveAllListeners(); //this.mView.Star2_btn.onClick.RemoveAllListeners(); //this.mView.Star3_btn.onClick.RemoveAllListeners(); //this.mView.buy_btn.onClick.RemoveAllListeners(); //this.mView.operation_10_btn.onClick.RemoveAllListeners(); //this.mView.operation_btn.onClick.RemoveAllListeners(); //this.mView.embattle_btn.onClick.RemoveAllListeners(); // this.mView.Clear_4_btn.onClick.RemoveAllListeners(); // this.mView.Clear_8_btn.onClick.RemoveAllListeners(); //this.mView.Clear_12_btn.onClick.RemoveAllListeners(); } }
private void initEvent(bool open) { if (open) { ZEventSystem.Register(EventConst.OnOpenTips, this, "OnOpenTips"); ZEventSystem.Register(EventConst.OnCloseTips, this, "OnCloseTips"); } else { ZEventSystem.DeRegister(EventConst.OnOpenTips, this); ZEventSystem.DeRegister(EventConst.OnCloseTips, this); } }
public void InitEvent(bool open) { if (open) { ZEventSystem.Register(EventConst.ShowOneLuckyDrawResults, this, "ShowOneLuckyDrawResults"); ZEventSystem.Register(EventConst.ShowTenLuckyDrawResults, this, "ShowTenLuckyDrawResults"); } else { ZEventSystem.DeRegister(EventConst.ShowOneLuckyDrawResults); ZEventSystem.DeRegister(EventConst.ShowTenLuckyDrawResults); } }
private void initEvent(bool open) { if (open) { this.mView.defend_btn.onClick.AddListener(delegate() { UIFace.GetSingleton().Open(UIID.Stub, 0, StubType.PVPDefend); }); ZEventSystem.Register(EventConst.OnStubChange, this, "OnStubChange"); } else { this.mView.defend_btn.onClick.RemoveAllListeners(); ZEventSystem.DeRegister(EventConst.OnStubChange, this); } }
private void _initEvent(bool open) { if (open) { _initAdditionEvent(true); ZEventSystem.Register(EventConst.UpdateItemList, this, "UpdateItemList"); ZEventSystem.Register(EventConst.UpdateItemParts, this, "UpdateItemParts"); } else { ZEventSystem.DeRegister(EventConst.UpdateItemList); ZEventSystem.DeRegister(EventConst.UpdateItemParts); _initAdditionEvent(false); } }
public void RegisterEvent(bool open) { if (open) { this.mView.ShowNPC((int)ShopMgr.Instance.shoptype); this.mView.ClickHead((int)ShopMgr.Instance.shoptype); this.mView.UpdateUnitShop((int)ShopMgr.Instance.shoptype); ZEventSystem.Register(EventConst.ShowUnitShop, this, "ShowUnitShop"); } else { ZEventSystem.DeRegister(EventConst.ShowNPC); ZEventSystem.DeRegister(EventConst.ShowUnitShop); } }
private void _initEvent(bool open) { if (open) { ZEventSystem.Register(EventConst.OnStubSaveOver, this, "OnStubSaveOver"); this.mView.StubCommit_btn.onClick.AddListener(delegate() { SaveStub(); }); } else { ZEventSystem.DeRegister(EventConst.OnStubSaveOver); this.mView.StubCommit_btn.onClick.RemoveAllListeners(); } }
public void Open() { select_trf.gameObject.SetActive(false); progress = Role.Instance.DivinationTree; SetProgress(progress); lucky_img.fillAmount = Role.Instance.DivinationLucky / maxLucky; EventListener.Get(take_btn.gameObject).OnClick = e => { ZEventSystem.Register(EventConst.ONOPENCOMPOSE, this, "OnOpenCompose"); UIFace.GetSingleton().Open(UIID.HeroDetail, HeroMgr.GetSingleton().GetNo1(), EHEROSHOWTYPE.Divination); Close(); if (select_trf.gameObject.activeInHierarchy) { select_trf.gameObject.SetActive(false); } ZEventSystem.DeRegister(EventConst.ONOPENCOMPOSE); }; }
public void InitEvent(bool open) { if (open) { ZEventSystem.Register(EventConst.OnMsgLogin, this, "OnLogin"); ZEventSystem.Register(EventConst.OnMsgLoginFailed, this, "OnLoginFailed"); ZEventSystem.Register(EventConst.OnMsgRegFailed, this, "OnRegFailed"); mView.login_btn.onClick.AddListener(() => { LoginOrRegist(true); }); mView.signin_btn.onClick.AddListener(() => { LoginOrRegist(false); }); } else { ZEventSystem.DeRegister(EventConst.OnMsgLogin, this); ZEventSystem.DeRegister(EventConst.OnMsgLoginFailed, this); ZEventSystem.DeRegister(EventConst.OnMsgRegFailed, this); mView.login_btn.onClick.RemoveAllListeners(); mView.signin_btn.onClick.RemoveAllListeners(); } }
private void initEvent(bool open) { if (open) { this.mView.hidefull_tog.onValueChanged.AddListener(delegate(bool check) { onHideFullChanged(check); }); this.mView.search_btn.onClick.AddListener(delegate() { search(); }); this.mView.refresh_btn.onClick.AddListener(delegate() { refresh(); }); this.mView.modifyflag_btn.onClick.AddListener(delegate() { modify(); }); this.mView.createcorps_btn.onClick.AddListener(delegate() { create(); }); ZEventSystem.Register(EventConst.OnSelectFlag, this, "OnSelectFlag"); } else { this.mView.hidefull_tog.onValueChanged.RemoveAllListeners(); this.mView.search_btn.onClick.RemoveAllListeners(); this.mView.refresh_btn.onClick.RemoveAllListeners(); this.mView.modifyflag_btn.onClick.RemoveAllListeners(); this.mView.createcorps_btn.onClick.RemoveAllListeners(); ZEventSystem.DeRegister(EventConst.OnSelectFlag, this); } }
public void Init(bool open) { if (open) { OnSignIc(System.DateTime.Now.Month * 100 + System.DateTime.Now.Day, true, 11270); ZEventSystem.Register(EventConst.OnSignIc, this, "OnSignIc"); this.mView.Specifier_btn.onClick.AddListener(delegate() { this.mView.Specifier_obj.SetActive(true); }); this.mView.close_btn.onClick.AddListener(delegate() { this.mView.Specifier_obj.SetActive(false); }); this.mView.Ensure_btn.onClick.AddListener(delegate() { this.mView.GetAward_obj.SetActive(false); }); // this.mView.GoGame_btn.onClick.AddListener(delegate () { OnSelectPer(); }); // this.mView.Woman1_tog.onValueChanged.AddListener((bool value) => this.mView.CutRole(false, this.mView.Woman1_tog.gameObject)); } else { ZEventSystem.DeRegister(EventConst.OnSignIc, this); this.mView.Specifier_btn.onClick.RemoveAllListeners(); this.mView.close_btn.onClick.RemoveAllListeners(); this.mView.Ensure_btn.onClick.RemoveAllListeners(); // this.mView.Select1_btn.onClick.RemoveAllListeners(); // this.mView.Woman_tog.onValueChanged.RemoveAllListeners(); } }
public void Init(bool open) { if (open) { ZEventSystem.Register(EventConst.Incident, this, "Incident"); ZEventSystem.Register(EventConst.OnMailItemIncident, this, "OnMailItemIncident"); this.mView.Close_btn.onClick.AddListener(delegate() { this.Close(); }); this.mView.totala_tog.onValueChanged.AddListener((bool value) => this.mView.GetMail(MailTyper.zero)); this.mView.noticea_tog.onValueChanged.AddListener((bool value) => this.mView.GetMail(MailTyper.one)); this.mView.awarda_tog.onValueChanged.AddListener((bool value) => this.mView.GetMail(MailTyper.two)); this.mView.lettera_tog.onValueChanged.AddListener((bool value) => this.mView.GetMail(MailTyper.three)); } else { ZEventSystem.DeRegister(EventConst.Incident, this); ZEventSystem.DeRegister(EventConst.OnMailItemIncident, this); this.mView.Close_btn.onClick.RemoveAllListeners(); this.mView.totala_tog.onValueChanged.RemoveAllListeners(); this.mView.noticea_tog.onValueChanged.RemoveAllListeners(); this.mView.awarda_tog.onValueChanged.RemoveAllListeners(); this.mView.lettera_tog.onValueChanged.RemoveAllListeners(); } }
private void _initEvent(bool open) { if (open) { ZEventSystem.Register(EventConst.OnCreateFight, this, "OnCreateFight"); ZEventSystem.Register(EventConst.OnFightUnitPop, this, "OnFightUnitPop"); ZEventSystem.Register(EventConst.OnAutoFightStateChange, this, "OnAutoFightStateChange"); ZEventSystem.Register(EventConst.OnGameSpeedChange, this, "OnGameSpeedChange"); ZEventSystem.Register(EventConst.OnNewRound, this, "OnNewRound"); ZEventSystem.Register(EventConst.OnUnitPause, this, "OnUnitPause"); ZEventSystem.Register(EventConst.OnMusicMute, this, "OnMusicMute"); ZEventSystem.Register(EventConst.OnSoundMute, this, "OnSoundMute"); ZEventSystem.Register(EventConst.OnCameraChangeOver, this, "OnCameraChangeOver"); ZEventSystem.Register(EventConst.OnFightStateChange, this, "OnFightStateChange"); ZEventSystem.Register(EventConst.OnTreasureFly, this, "OnTreasureFly"); ZEventSystem.Register(EventConst.OnTreasureFlyOver, this, "OnTreasureFlyOver"); ZEventSystem.Register(EventConst.OnCreateSummon, this, "OnCreateSummon"); ZEventSystem.Register(EventConst.DropOutItem, this, "DropOutItem"); ZEventSystem.Register(EventConst.OnInitEvent, this, "OnInitEvent"); this.mView.auto_fight_btn.onClick.AddListener(delegate() { this.OnAutoFightClick(); }); this.mView.speed_btn.onClick.AddListener(delegate() { this.OnSpeedClick(); }); this.mView.pause_btn.onClick.AddListener(delegate() { this.GamePause(true); }); this.mView.continue_btn.onClick.AddListener(delegate() { this.GamePause(false); }); this.mView.exit_btn.onClick.AddListener(delegate() { this.ExitFight(); }); this.mView.music_btn.onClick.AddListener(delegate() { this.OnMusicClick(); }); this.mView.sound_btn.onClick.AddListener(delegate() { this.OnSoundClick(); }); this.mView.FailExit_btn.onClick.AddListener(delegate() { this.ExitFight(); }); this.mView.FailTryAgain_btn.onClick.AddListener(delegate() { this.Retry(); }); this.mView.PVERetry_btn.onClick.AddListener(delegate() { this.Retry(); }); this.mView.PVENext_btn.onClick.AddListener(delegate() { this.OpenLevel(); }); this.mView.PVEBack_btn.onClick.AddListener(delegate() { this.ExitFight(); }); this.mView.PVPRetry_btn.onClick.AddListener(delegate() { this.Retry(); }); this.mView.DataAnalyzeClose_btn.onClick.AddListener(delegate() { this.mView.OpenDataAnalyze(false); }); this.mView.PVEDataAnalyze_btn.onClick.AddListener(delegate() { this.mView.OpenDataAnalyze(true); }); this.mView.PVPDataAnalyze_btn.onClick.AddListener(delegate() { this.mView.OpenDataAnalyze(true); }); this.mView.FailDataAnalyze_btn.onClick.AddListener(delegate() { this.mView.OpenDataAnalyze(true); }); } else { ZEventSystem.DeRegister(EventConst.OnInitEvent, this); ZEventSystem.DeRegister(EventConst.OnCreateFight, this); ZEventSystem.DeRegister(EventConst.OnFightUnitPop, this); ZEventSystem.DeRegister(EventConst.OnAutoFightStateChange, this); ZEventSystem.DeRegister(EventConst.OnGameSpeedChange, this); ZEventSystem.DeRegister(EventConst.OnNewRound, this); ZEventSystem.DeRegister(EventConst.OnUnitPause, this); ZEventSystem.DeRegister(EventConst.OnMusicMute, this); ZEventSystem.DeRegister(EventConst.OnSoundMute, this); ZEventSystem.DeRegister(EventConst.OnCameraChangeOver, this); ZEventSystem.DeRegister(EventConst.OnFightStateChange, this); ZEventSystem.DeRegister(EventConst.OnTreasureFly, this); ZEventSystem.DeRegister(EventConst.OnTreasureFlyOver, this); ZEventSystem.DeRegister(EventConst.OnCreateSummon, this); ZEventSystem.DeRegister(EventConst.DropOutItem, this); this.mView.auto_fight_btn.onClick.RemoveAllListeners(); this.mView.speed_btn.onClick.RemoveAllListeners(); this.mView.pause_btn.onClick.RemoveAllListeners(); this.mView.continue_btn.onClick.RemoveAllListeners(); this.mView.exit_btn.onClick.RemoveAllListeners(); this.mView.music_btn.onClick.RemoveAllListeners(); this.mView.sound_btn.onClick.RemoveAllListeners(); this.mView.FailExit_btn.onClick.RemoveAllListeners(); this.mView.FailTryAgain_btn.onClick.RemoveAllListeners(); this.mView.PVERetry_btn.onClick.RemoveAllListeners(); this.mView.PVENext_btn.onClick.RemoveAllListeners(); this.mView.PVEBack_btn.onClick.RemoveAllListeners(); this.mView.PVPRetry_btn.onClick.RemoveAllListeners(); this.mView.DataAnalyzeClose_btn.onClick.RemoveAllListeners(); this.mView.PVEDataAnalyze_btn.onClick.RemoveAllListeners(); this.mView.PVPDataAnalyze_btn.onClick.RemoveAllListeners(); this.mView.FailDataAnalyze_btn.onClick.RemoveAllListeners(); _initAdditionEvent(false); HeroTog(false); } }