Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     ZEventSystem.Register(EventConst.OnGamePreloaded, this, "OnGamePreloaded");
     _clientMd5Path = Application.persistentDataPath + "/md5file.uab";
     _serverMd5Path = getRemotePath("md5file.uab");
     StartCoroutine(CheckUpdate());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// OPEN调用
 /// </summary>
 private void RegisteEvent()
 {
     ZEventSystem.Register(EventConst.REFRESHSIDE, this, "ShowSide");
     ZEventSystem.Register(EventConst.REFRESHLEFT, this, "ShowLeft");
     ZEventSystem.Register(EventConst.REFRESHRIGHT, this, "ShowRight");
     ZEventSystem.Register(EventConst.TOTEMDATACHANGE, this, "RefreshDivination");
 }
Ejemplo n.º 3
0
 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();
         }
     }
 }
Ejemplo n.º 4
0
 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();
     }
 }
Ejemplo n.º 5
0
 public override void OnOpen()
 {
     base.OnOpen();
     mView.Open();
     this.mView.Head.onClick.AddListener(delegate() { OpenMajesty(); });
     ZEventSystem.Register(EventConst.UpdateData, this, "UpdateData");
 }
Ejemplo n.º 6
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();
     }
 }
Ejemplo n.º 7
0
 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);
     }
 }
Ejemplo n.º 8
0
    //持续伤害、治疗直接处理
    //控制状态直接加在本体
    #endregion

    public BuffMgr(FightUnit unit)
    {
        this._unit = unit;
        ZEventSystem.Register(EventConst.OnFightUnitDie, this, "OnFightUnitDie");
        ZEventSystem.Register(EventConst.OnFightUnitHit, this, "OnFightUnitHit");
        ZEventSystem.Register(EventConst.OnFightUnitHpChange, this, "OnFightUnitHpChange");
        ZEventSystem.Register(EventConst.OnSkillTakeEffect, this, "OnSkillTakeEffect");
        ZEventSystem.Register(EventConst.OnFightUnitBooster, this, "OnFightUnitBooster");
    }
Ejemplo n.º 9
0
 public void InitEvent(bool open)
 {
     if (open)
     {
         ZEventSystem.Register(EventConst.ShowAllHeros, this, "ShowAllHeros");
     }
     else
     {
         ZEventSystem.DeRegister(EventConst.ShowAllHeros);
     }
 }
Ejemplo n.º 10
0
    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();
        }
    }
Ejemplo n.º 11
0
 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);
     }
 }
Ejemplo n.º 12
0
 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);
     }
 }
Ejemplo n.º 13
0
    public override void OnOpen()
    {
        base.OnOpen();
        this.mView.OpenShop();

        ZEventSystem.Register(EventConst.RefreshTimes, this.mView, "RefreshTimes");
        this.mView.ordinaryshop_btn.onClick.AddListener(delegate() { this.OpenShopItem(ShopType.ordinaryshop); });
        this.mView.passbarrier_btn.onClick.AddListener(delegate() { this.OpenShopItem(ShopType.passbarriershop); });
        this.mView.competitive_btn.interactable = false; //暂时
        this.mView.guildshop_btn.interactable   = false; //暂时
        this.mView.competitive_btn.onClick.AddListener(delegate() { this.OpenShopItem(ShopType.competitiveshop); });
        this.mView.guildshop_btn.onClick.AddListener(delegate() { this.OpenShopItem(ShopType.guildshop); });
    }
Ejemplo n.º 14
0
    private void AddEvent()
    {
        EventListener.Get(str_tog.gameObject).OnClick = e =>
        {
            if (Tab == 1)
            {
                return;
            }
            Tab = 1;
            OnTipToggleClick();
            SetStrengthenView();
        };
        EventListener.Get(adv_tog.gameObject).OnClick = e =>
        {
            if (Tab == 2)
            {
                return;
            }

            Tab = 2;
            OnTipToggleClick();
            SetAdvancedView();
        };
        EventListener.Get(ran_tog.gameObject).OnClick = e =>
        {
            if (equip.ItemData.rare < 3)
            {
                CanvasView.Instance.AddNotice("蓝色以上品质装备开启洗炼功能");
                switch (Tab)
                {
                case 1:
                    str_tog.isOn = true;
                    break;

                case 2:
                    adv_tog.isOn = true;
                    break;
                }
                return;
            }
            if (Tab == 3)
            {
                return;
            }
            Tab = 3;
            OnTipToggleClick();
            SetRandomView();
        };
        ZEventSystem.Register(EventConst.UPSTRENGTHENVIEW, this, "UpView");
    }
Ejemplo n.º 15
0
 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);
     }
 }
Ejemplo n.º 16
0
 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);
     }
 }
Ejemplo n.º 17
0
 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);
     }
 }
Ejemplo n.º 18
0
 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();
     }
 }
Ejemplo n.º 19
0
 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);
     };
 }
Ejemplo n.º 20
0
 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();
     }
 }
Ejemplo n.º 21
0
 private UIFace()
 {
     Registration(UIID.Login, new LoginCtrl());
     Registration(UIID.Main, new MainCtrl());
     Registration(UIID.Bag, new ItemCtrl());
     Registration(UIID.Match, new MatchUICtrl());
     Registration(UIID.Battle, new BattleCtrl());
     Registration(UIID.Hero, new HeroCtrl());
     Registration(UIID.HeroDetail, new HeroDetail());
     Registration(UIID.HeroStarUp, new StarUpCtrl());
     Registration(UIID.HeroGoto, new HeroGotoCtrl());
     Registration(UIID.CreateRole, new SelectPerCtrl());
     Registration(UIID.ExpPool, new ExppoolCtrl());
     Registration(UIID.SelectCountry, new SelectStateCtrl());
     Registration(UIID.Stub, new StubCtrl());
     Registration(UIID.Tip, new TipCtrl());
     Registration(UIID.Award, new SevenActivityCtrl());
     Registration(UIID.SignIn, new SignInCtrl());
     Registration(UIID.Shop, new ShopCtrl());
     Registration(UIID.WesternShop, new WesternShopCtrl());
     Registration(UIID.Corps, new CorpsCtrl());
     Registration(UIID.FlagSelect, new FlagSelectCtrl());
     Registration(UIID.CorpsMain, new CorpsMainCtrl());
     Registration(UIID.Divination, new DivinationCtrl());
     Registration(UIID.DivinationTip, new DivinationTip());
     Registration(UIID.PlayerInfo, new PlayerInfoCtrl());
     Registration(UIID.PlayerInfoDetail, new PlayerInfoDetailCtrl());
     Registration(UIID.CompostDivination, new ComposeDivinationCtr());
     Registration(UIID.Recruiting, new RecruitingCtrl());
     Registration(UIID.Mail, new PostBoxCtrl());
     Registration(UIID.GM, new GMCtrl());
     Registration(UIID.Customs, new CustomsPassCtrl());
     Registration(UIID.ShopItem, new ShopUICtrl());
     Registration(UIID.Tips, new TipsCtrl());
     Registration(UIID.Strengthen, new StrengthenCtrl());
     Registration(UIID.StrengthenTip, new StrengthenTipCtrl());
     Registration(UIID.EuqipTipCtrl, new EuqipTipCtrl());
     Registration(UIID.RecruitingAward, new RecruitingAwardCtrl());
     Registration(UIID.Arena, new ArenaCtrl());
     Registration(UIID.Majesty, new MajestyCtrl());
     Registration(UIID.RecruitingProbability, new RecruitingProbabilityCtrl());
     ZEventSystem.Register(EventConst.NAVIGATIONBACK, this, "CallBack");
 }
Ejemplo n.º 22
0
    private void Instantiate(string id)
    {
        GameObject         go  = Instantiate(item, itemparent_trf, false);
        DivinationItemView div = go.GetComponent <DivinationItemView>();
        TotemData          td  = TotemMgr.GetSingleton().GetTotemByID(id);

        if (td == null)
        {
            td = new TotemData(40007)
            {
                md5 = id
            };
            TotemMgr.GetSingleton().AddTotem(td);
        }
        div.SetView(td);
        EventListener.Get(go).OnClick = e =>
        {
            ZEventSystem.Register(EventConst.ONOPENCOMPOSE, this, "OnOpenCompose");
            UIFace.GetSingleton().Open(UIID.DivinationTip, td, SHOWBUTTON.Ecompose);
            if (!select_trf.gameObject.activeInHierarchy)
            {
                select_trf.gameObject.SetActive(true);
            }
            select_trf.SetParent(go.transform);
            select_trf.transform.localPosition = Vector3.zero;
        };
        EventListener.Get(go).BegineDragEvent = e =>
        {
            Item_sr.OnBeginDrag(e);
        };
        EventListener.Get(go).DragEvent = e =>
        {
            Item_sr.OnDrag(e);
        };
        EventListener.Get(go).EndDragEvent = e =>
        {
            Item_sr.OnEndDrag(e);
        };
        Role.Instance.DivinationLucky += JsonMgr.GetSingleton().GetTotemTreeByID(progress + 1).spend;
        lucky_img.fillAmount           = Role.Instance.DivinationLucky / maxLucky;
    }
Ejemplo n.º 23
0
 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);
     }
 }
Ejemplo n.º 24
0
 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();
     }
 }
Ejemplo n.º 25
0
    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();
        }
    }
Ejemplo n.º 26
0
 public SceneMgr()
 {
     ZEventSystem.Register(EventConst.OnScenePreload, this, "OnLoadSceneOver");
     ZEventSystem.Register(EventConst.OnPreload, this, "OnPreload");
     ZEventSystem.Register(EventConst.SceneLoaded, this, "OnSceneLoaded");
 }
Ejemplo n.º 27
0
 public override void OnInit()
 {
     base.OnInit();
     ZEventSystem.Register(EventConst.GetShopItemByType, this, "GetShopItemByType");
 }
Ejemplo n.º 28
0
 public void Open()
 {
     all_img.GetComponent <Toggle>().isOn = true;
     ProcessCtrl.Instance.GoCoroutine("ShowWorker", ShowWorker(EWORKER.ALL));
     ZEventSystem.Register(EventConst.HEROINFOCHANGE, this, "RefreshHeroInfo");
 }
Ejemplo n.º 29
0
    /// <summary>
    /// 战斗状态改变
    /// </summary>
    /// <param name="state"></param>
    public void OnFightStateChange(FightState state)
    {
        switch (state)
        {
        case FightState.Init:
            break;

        case FightState.Prepare:
            //设置所有单位初始站位,目标站位
            for (int idx = 0; idx < AllFighters.Count; ++idx)
            {
                AllFighters[idx].SystemProtect = false;
                AllFighters[idx].InitPassiveSkill();
            }
            ZEventSystem.Register(EventConst.OnUnitMoveOver, this, "OnUnitMoveOver");
            EnterBattileField();
            break;

        case FightState.Fight:
            EDebug.Log("战斗开始");
            CamMgrObj.ChangeCam(true);
            //使用被动技能
            for (int idx = 0; idx < AllFighters.Count; ++idx)
            {
                FightUnit u = AllFighters[idx];
                if (u.IsDead)
                {
                    continue;
                }
                AllFighters[idx].FightIntervalAcc = 0;
                AllFighters[idx].FightInterval    = 0;
            }
            break;

        case FightState.Continue:
            CamMgrObj.ChangeCam(false);

            clearFightState(false);

            for (int idx = 0; idx < Fighters.Count; ++idx)
            {
                FightUnit u = Fighters[idx];
                if (u.IsDead)
                {
                    continue;
                }
                u.RoundOver();
                u.NewRound();
            }
            ExitBattleField();
            break;

        case FightState.Over:
            EDebug.Log("战斗结束, 是否胜利:" + HasWin);
            clearFightState(true);
            break;

        default:
            break;
        }
    }
Ejemplo n.º 30
0
 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);
     }
 }