Esempio n. 1
0
 private void ClickToRecharge(GameObject go)
 {
     Singleton <ShopView> .Instance.ThroughShop = ETypicalShop.Recharge;
     CtrlManager.OpenWindow(WindowID.ShopViewNew, null);
     CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
     this.CloseThisWindow(null);
 }
Esempio n. 2
0
 private void CloseView(GameObject obj)
 {
     if (null != obj)
     {
         CtrlManager.CloseWindow(WindowID.TrumpetView);
     }
 }
Esempio n. 3
0
        public override void RegisterUpdateHandler()
        {
            CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
            Singleton <MenuTopBarView> .Instance.DoOpenOtherViewAction(0.25f);

            this.RefreshUI();
        }
Esempio n. 4
0
        private void OnClick_ShowGoodsPackage(GameObject obj = null)
        {
            CtrlManager.OpenWindow(WindowID.PurchasePopupView, null);
            Singleton <PurchasePopupView> .Instance.onSuccess.Add(delegate
            {
                CtrlManager.CloseWindow(WindowID.HomePayView);
            });

            if (this.Pack1.gameObject.activeInHierarchy)
            {
                Singleton <PurchasePopupView> .Instance.Show(ETypicalCommodity.NewbieHeroGiftPackage, false);
            }
            else if (this.Pack2.gameObject.activeInHierarchy)
            {
                Singleton <PurchasePopupView> .Instance.Show(ETypicalCommodity.LuxuriousHeroGiftPackage, false);
            }
            else if (this.Pack3.gameObject.activeInHierarchy)
            {
                Singleton <PurchasePopupView> .Instance.Show(ETypicalCommodity.NewYearGiftPackage, false);
            }
            else
            {
                CtrlManager.CloseWindow(WindowID.PurchasePopupView);
            }
        }
Esempio n. 5
0
 public override void HandleAfterOpenView()
 {
     AutoTestController.InvokeTestLogic(AutoTestTag.Home, delegate
     {
         CtrlManager.CloseWindow(WindowID.AnnouncementView);
     }, 1f);
 }
Esempio n. 6
0
 public override void RegisterUpdateHandler()
 {
     CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
     this.Hidden(false);
     MobaMessageManager.RegistMessage((ClientMsg)21049, new MobaMessageFunc(this.OnClickArrow));
     MobaMessageManager.RegistMessage((ClientMsg)21046, new MobaMessageFunc(this.OnChangeNPC));
 }
 private void CloseWindow(GameObject obj)
 {
     if (null != obj)
     {
         MobaMessageManagerTools.SendClientMsg(ClientV2C.coalesceviewCloseView, null, false);
         CtrlManager.CloseWindow(WindowID.SynthesisPopupView);
     }
 }
Esempio n. 8
0
 public void CloseViewClick(GameObject obj)
 {
     if (this.canClick)
     {
         this.canClick = false;
         CtrlManager.CloseWindow(WindowID.UnlockView);
         this.text_str = string.Empty;
         this.CheckShowType();
     }
 }
Esempio n. 9
0
 private void AddDiamond(GameObject objct_1 = null)
 {
     if (!Singleton <ShopView> .Instance.IsOpen)
     {
         Singleton <ShopView> .Instance.ThroughShop = ETypicalShop.Recharge;
         CtrlManager.OpenWindow(WindowID.ShopViewNew, null);
         CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
     }
     else
     {
         Singleton <ShopView> .Instance.SetShopType(6);
     }
 }
Esempio n. 10
0
 private void ClickCloseRuneView(GameObject obj)
 {
     if (null != obj)
     {
         if (null != Singleton <PropertyView> .Instance.transform && Singleton <PropertyView> .Instance.gameObject.activeInHierarchy)
         {
             MobaMessageManagerTools.SendClientMsg(ClientV2C.propviewInitToggle, PropertyType.Info, false);
             MobaMessageManagerTools.SendClientMsg(ClientV2C.propviewChangeToggle, PropertyType.Info, false);
             MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewCloseView, null, false);
         }
         CtrlManager.CloseWindow(WindowID.RunesOverView);
     }
 }
Esempio n. 11
0
 public override void Init()
 {
     base.Init();
     this.TitleLabel = this.transform.Find("Anchor/Panel/Title").GetComponent <UILabel>();
     this.proxy      = this.transform.GetComponent <AwardViewContainer>();
     this.sample     = this.proxy.rewardItem;
     UIEventListener.Get(this.proxy.buttonGetAward.gameObject).onClick = delegate
     {
         CtrlManager.CloseWindow(WindowID.AwardView);
         if (this.onClose != null)
         {
             this.onClose();
         }
     };
 }
Esempio n. 12
0
 private void OpenWaitingView(bool b)
 {
     if (b)
     {
         if (!Singleton <NewWaitingView> .Instance.IsOpened)
         {
             CtrlManager.OpenWindow(WindowID.NewWaitingView, null);
         }
         this.RefreshWaitingViewText();
     }
     else if (Singleton <NewWaitingView> .Instance.IsOpened)
     {
         CtrlManager.CloseWindow(WindowID.NewWaitingView);
     }
 }
Esempio n. 13
0
        private void SucceedInCreatingCount()
        {
            ModelManager.Instance.Get_userData_X().LoginCount++;
            if (GlobalSettings.isLoginByHoolaiSDK)
            {
                InitSDK.instance.SetExtData("3");
                AnalyticsToolManager.Register(ModelManager.Instance.Get_accountData_X().AccountId);
            }
            else if (GlobalSettings.isLoginByAnySDK)
            {
                InitSDK.instance.SetAnySDKExtData("2");
            }
            Singleton <MenuTopBarView> .Instance.RefreshUI();

            CtrlManager.CloseWindow(WindowID.SummonerRegisterView);
            NewbieManager.Instance.TryProcessNewbieGuide();
        }
        private void ClickSkillItem(GameObject obj = null)
        {
            if (!this.skillObjDict[obj.name].IsCanChoice())
            {
                CtrlManager.CloseWindow(WindowID.TipView);
                Singleton <TipView> .Instance.SetText("技能还未解锁", 0f);

                CtrlManager.OpenWindow(WindowID.TipView, null);
                return;
            }
            this.ShowSkillData(obj.name);
            if (this.clickSkillCallBack != null)
            {
                this.clickSkillCallBack(obj.name);
            }
            CtrlManager.CloseWindow(WindowID.PvpChoiceSkillView);
        }
 private void GoToRank(GameObject go)
 {
     if (this.skipPage == "1")
     {
         Singleton <RankView> .Instance.selectBtn = "Ladder";
     }
     else if (this.skipPage == "2")
     {
         Singleton <RankView> .Instance.selectBtn = "MagicBottle";
     }
     else
     {
         Singleton <RankView> .Instance.selectBtn = "Charming";
     }
     CtrlManager.OpenWindow(WindowID.RankView, null);
     CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
 }
Esempio n. 16
0
 private void OnResetBtn(GameObject go)
 {
     if (LevelManager.Instance.CheckSceneIsTest())
     {
         if (LevelManager.Instance.IsServerZyBattleType)
         {
             return;
         }
         GameObject gameObject = GameObject.FindGameObjectWithTag("Player");
         if (gameObject != null)
         {
             Units       component = gameObject.GetComponent <Units>();
             UtilCounter counter   = UtilManager.Instance.GetCounter(UtilType.Exp);
             ExpValue    expValue  = counter.GetValue(PlayerControlMgr.Instance.GetPlayer().unique_id) as ExpValue;
             expValue.AddExp(-expValue.CurExp);
             component.skillManager.SkillPointsLeft = 0;
             for (int i = 0; i < 4; i++)
             {
                 List <SkillDataKey> skillsByIndex = component.getSkillsByIndex(i);
                 if (skillsByIndex != null)
                 {
                     for (int j = 0; j < skillsByIndex.Count; j++)
                     {
                         skillsByIndex[j] = new SkillDataKey(skillsByIndex[j].SkillID, 0, skillsByIndex[j].Skin);
                         Skill skillById = component.getSkillById(skillsByIndex[j].SkillID);
                         if (skillById != null)
                         {
                             skillById.SetLevel(0);
                         }
                     }
                 }
             }
             SkillCounter skillCounter = UtilManager.Instance.GetCounter(UtilType.Skill) as SkillCounter;
             skillCounter.OnHeroLevelup(component, 0);
             component.level = 1;
             component.UpLevel();
             CtrlManager.CloseWindow(WindowID.SkillView);
             CtrlManager.OpenWindow(WindowID.SkillView, null);
         }
     }
 }
Esempio n. 17
0
        private void ShowResult()
        {
            if (GameManager.Instance == null)
            {
                return;
            }
            SurrenderMgr surrenderMgr = GameManager.Instance.SurrenderMgr;

            if (surrenderMgr == null)
            {
                return;
            }
            int num = Mathf.CeilToInt((float)surrenderMgr.ValidVoters * 0.7f);

            if (num <= surrenderMgr.AcceptCount)
            {
                CtrlManager.CloseWindow(WindowID.SurrenderView);
                return;
            }
            this._comps.ShowVotePanel(false);
            this._comps.ShowResultPanel(true);
            string resultText  = string.Empty;
            int    acceptCount = surrenderMgr.AcceptCount;
            int    num2        = surrenderMgr.Votes - surrenderMgr.AcceptCount;
            int    num3        = surrenderMgr.OurTeamCount - surrenderMgr.Votes;
            string format      = "投票结果{0}票同意 {1}票拒绝 {2}票弃权 投降失败";

            resultText = string.Format(format, acceptCount, num2, num3);
            this._comps.SetResultText(resultText);
            if (this._closeTask == null)
            {
                this._closeTask           = new Task(this.TimerEnumerator(4f), false);
                this._closeTask.Finished += delegate(bool manual)
                {
                    this._closeTask = null;
                    CtrlManager.CloseWindow(WindowID.SurrenderView);
                };
                this._closeTask.Start();
            }
        }
Esempio n. 18
0
        public override void HandleAfterOpenView()
        {
            this.clickCd = false;
            SendMsgManager.Instance.SendMsg(MobaGameCode.DealGameReport, null, new object[0]);
            if (Singleton <MenuBottomBarView> .Instance.IsOpen)
            {
                CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
            }
            if (PvpMatchMgr.State == PvpMatchState.Matching)
            {
                this.ShowMatchingFrame();
            }
            else if (PvpMatchMgr.State == PvpMatchState.Matched)
            {
                this.ShowMatchingFrame();
            }
            PvpLevelStorage.DispatchChooseGameMsg();
            bool flag = CharacterDataMgr.instance.GetUserLevel(ModelManager.Instance.Get_userData_X().Exp) >= BaseDataMgr.instance.GetDataById <SysBattleSceneVo>("80006").scene_limit_level;

            this._daluandou.FindChild("Lock").gameObject.SetActive(!flag);
            this._daluandou.GetComponent <BoxCollider>().enabled = flag;
            if (flag)
            {
                this._task_timeLock = this._timeLockCMgr.StartCoroutine(this.RankTimeLock(), true);
            }
            this._timeLockCMgr.StartCoroutine(this.RankSeasonLock(), true);
            bool flag2 = CharacterDataMgr.instance.GetUserLevel(ModelManager.Instance.Get_userData_X().Exp) >= BaseDataMgr.instance.GetDataById <SysBattleSceneVo>("80021").scene_limit_level;

            this._jbs.FindChild("Lock").gameObject.SetActive(!flag2);
            this._jbs.GetComponent <BoxCollider>().enabled = flag2;
            if (flag2)
            {
                this._timeLockCMgr.StartCoroutine(this.LeagueTimeLock(), true);
            }
            AutoTestController.InvokeTestLogic(AutoTestTag.EnterPvp, delegate
            {
                this.ClickFightWithRobot(null);
            }, 1f);
        }
Esempio n. 19
0
 private void OnClickPlay(GameObject go)
 {
     CtrlManager.CloseWindow(WindowID.PvpWaitView);
     PvpMatchMgr.Instance.ForceSelectHero();
 }
 private void Click_CloseView(GameObject go)
 {
     CtrlManager.CloseWindow(WindowID.ChangeAvatarView);
 }
Esempio n. 21
0
 private void OnBtnCancel(GameObject button = null)
 {
     CtrlManager.CloseWindow(WindowID.NewPopView);
     this.Func_CallBack(EPopViewRet.eCancel);
 }
Esempio n. 22
0
 public void CloseViewWait()
 {
     CtrlManager.CloseWindow(WindowID.TipView);
 }
 private void SystemBackButton_Event(GameObject Object_1 = null)
 {
     CtrlManager.CloseWindow(WindowID.SystemSettingView);
 }
 private void SystemBlackList_Event(GameObject Object_1 = null)
 {
     CtrlManager.CloseWindow(WindowID.SystemSettingView);
     CtrlManager.OpenWindow(WindowID.BlackListView, null);
 }
Esempio n. 25
0
 private void OnClickPause(GameObject go)
 {
     CtrlManager.CloseWindow(WindowID.PvpWaitView);
     Singleton <MenuTopBarView> .Instance.TryShowTimeTips();
 }
Esempio n. 26
0
 private void Close()
 {
     CtrlManager.CloseWindow(WindowID.ActivityView);
     Singleton <MenuView> .Instance.CheckActivityState();
 }
Esempio n. 27
0
 private void OnCloseBtn(GameObject go)
 {
     CtrlManager.CloseWindow(WindowID.DetailsInfo);
 }
Esempio n. 28
0
 private void OnBtnOk(GameObject obj = null)
 {
     CtrlManager.CloseWindow(WindowID.NewPopView);
     this.Func_CallBack(EPopViewRet.eOk);
 }
Esempio n. 29
0
 private void CloseTheView(GameObject obj = null)
 {
     CtrlManager.CloseWindow(WindowID.LevelupView);
 }
 private void ClickBackBtn(GameObject obj = null)
 {
     CtrlManager.CloseWindow(WindowID.PvpChoiceSkillView);
 }