Exemplo n.º 1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Backslash))
     {
         if (null != Singleton <HomeChatview> .Instance.transform)
         {
             if (Singleton <HomeChatview> .Instance.gameObject.activeInHierarchy)
             {
                 CtrlManager.CloseWindow(WindowID.HomeChatview);
             }
             else
             {
                 CtrlManager.OpenWindow(WindowID.HomeChatview, null);
                 MobaMessageManagerTools.SendClientMsg(ClientV2C.chatviewOpenView, ChitchatType.Hall, false);
                 MobaMessageManagerTools.SendClientMsg(ClientV2C.chatviewFillChatHistory, false, false);
             }
         }
         else
         {
             CtrlManager.OpenWindow(WindowID.HomeChatview, null);
             MobaMessageManagerTools.SendClientMsg(ClientV2C.chatviewOpenView, ChitchatType.Hall, false);
             MobaMessageManagerTools.SendClientMsg(ClientV2C.chatviewFillChatHistory, true, false);
         }
     }
 }
        public override void OnLeave()
        {
            NewbieManager.Instance.StopVoiceHintLoop();
            Singleton <NewbieView> .Instance.HideLearnSkillHint(0);

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
Exemplo n.º 3
0
 public override void LoadSceneEnd()
 {
     if (ChaosFightMgr.IsChaosFight)
     {
         CtrlManager.CloseWindow(WindowID.PVPV3LoadView);
     }
     else
     {
         CtrlManager.CloseWindow(WindowID.PVPLoadingView);
     }
     base.LoadSceneEnd();
     base.SendSceneLoadComplete();
     base.SetGoOn();
     if (NewbieManager.Instance.IsDoNewbieSpecialProcess())
     {
         NewbieManager.Instance.MoveNextStep();
     }
     else if (NewbieManager.Instance.IsInNewbiePhase(ENewbiePhaseType.FakeMatchFive))
     {
         NewbieManager.Instance.MoveCertainStep(ENewbieStepType.FakeMatchFive_TriggerChecker, false, ENewbieStepType.None);
     }
     else if (NewbieManager.Instance.IsGuideNewbieNormalCastSkill())
     {
         NewbieManager.Instance.EnterGuideNewbieNormalCastSkill();
     }
 }
        public override void OnLeave()
        {
            NewbieManager.Instance.StopVoiceHintOnce();
            Singleton <NewbieView> .Instance.HideMask();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
Exemplo n.º 5
0
 private void closeView(string[] param)
 {
     CtrlManager.CloseWindow(WindowID.MiniMapView);
     CtrlManager.CloseWindow(WindowID.SkillView);
     CtrlManager.CloseWindow(WindowID.ShowEquipmentPanelView);
     CtrlManager.CloseWindow(WindowID.CharacterView);
 }
 private void OnMsg_LoadView_complete(MobaMessage msg)
 {
     MobaMessageManager.UnRegistMessage(ClientV2C.LoadView2_subComplete, new MobaMessageFunc(this.OnMsg_LoadView_complete));
     CtrlManager.CloseWindow(WindowID.LoadView2);
     PlayerMng.Instance.Enable(false);
     base.SetGoOn();
 }
Exemplo n.º 7
0
 private void ConfirmReconnect()
 {
     if (GlobalSettings.NoReConnnect || this._isConfirmCd || this._peer == null)
     {
         return;
     }
     if (this.ConnectFlag)
     {
         this.ReconnectFinish();
         return;
     }
     if (this._isConfirmingReconnect)
     {
         return;
     }
     if (PvpServer._autoRetryNum < 5)
     {
         PvpServer._autoRetryNum++;
         PvpServer.LockScreen(true);
         this.Connect();
     }
     else
     {
         CtrlManager.CloseWindow(WindowID.ProgressView);
         PvpServer._autoRetryNum     = 0;
         this._isConfirmingReconnect = true;
         CtrlManager.ShowMsgBox(LanguageManager.Instance.GetStringById("ServerResponse_Title_GameServerDisconnect", "游戏服务器断开"), LanguageManager.Instance.GetStringById("ServerResponse_Content_GameServerDisconnect", "网络出故障了,请重试"), new Action <bool>(this.ConnectOrRestart), PopViewType.PopTwoButton, "确定", "重启游戏", null);
     }
 }
Exemplo n.º 8
0
 private void OnMsg_CloseSynthesis(MobaMessage msg)
 {
     if (msg != null)
     {
         CtrlManager.CloseWindow(WindowID.SynthesisPopupView);
     }
 }
        private void OnGetAllGameServers(MobaMessage msg)
        {
            OperationResponse operationResponse = msg.Param as OperationResponse;

            if (operationResponse == null)
            {
                Singleton <TipView> .Instance.ShowViewSetText("更新服务器列表失败:系统错误", 1f);

                this.GetAllGameServers();
            }
            else
            {
                short returnCode = operationResponse.ReturnCode;
                if (returnCode != 0)
                {
                    Singleton <TipView> .Instance.ShowViewSetText("更新服务器列表失败:系统错误", 1f);

                    this.GetAllGameServers();
                }
                else
                {
                    CtrlManager.CloseWindow(WindowID.LoginView_New);
                    CtrlManager.OpenWindow(WindowID.AreaView_New, null);
                    this.bFinish = true;
                }
            }
        }
Exemplo n.º 10
0
        private void DisplayData(ChatMessageNew chatMessage, bool isSelf)
        {
            string        str = chatMessage.Message;
            AgentBaseInfo abi = chatMessage.Client;

            if (chatMessage.ChatType == 8)
            {
                str = "#e062" + str;
                if (Singleton <TrumpetView> .Instance != null && isSelf)
                {
                    Singleton <TrumpetView> .Instance.ClearContent();
                }
                CtrlManager.CloseWindow(WindowID.TrumpetView);
            }
            GridHelper.AddToGrid <ChatItem>(this.transGrid, (!isSelf) ? this.otherChatItem : this.myChatItem, isSelf, delegate(int idx, ChatItem comp)
            {
                comp.Init(abi, str, idx, isSelf, (ChatType)chatMessage.ChatType);
                comp.name = idx.ToString();
                this.queueChat.Enqueue(comp);
            });
            if (this.queueChat.Count > 99)
            {
                ChatItem chatItem = this.queueChat.Dequeue();
                UnityEngine.Object.Destroy(chatItem.gameObject);
            }
            this.usv.contentPivot = UIWidget.Pivot.Bottom;
            this.usv.ResetPosition();
            this.JudgePosition();
        }
Exemplo n.º 11
0
    public override void OnUpdate(float deltaTime)
    {
        this.timeSum += deltaTime;
        if (this.self.isPlayer)
        {
            if ((double)this.self.hp < (double)this.self.hp_max * 0.1 && this.self.isLive)
            {
                if (!Singleton <HeartView> .Instance.IsOpened)
                {
                    CtrlManager.OpenWindow(WindowID.HeartView, null);
                }
            }
            else if (Singleton <HeartView> .Instance.IsOpened)
            {
                CtrlManager.CloseWindow(WindowID.HeartView);
            }
        }
        if ((this.self.isHero || this.self.IsSummonedCreature) && this.self.isMyTeam && this.self.isLive)
        {
            this.SetShadowHeight(this.self.mTransform.position.y);
            if (this.self.isPlayer && Singleton <SkillView> .Instance.transform && this.timeSum >= 0.8f)
            {
                Singleton <SkillView> .Instance.UpdateSelfValue(this.self, false, false);

                this.timeSum = 0f;
            }
        }
        if (this.isChangePlayer)
        {
            if (!this.self.isPlayer)
            {
                if (this.mSkillPointer.IsValid <SkillPointer>())
                {
                    this.mSkillPointer.Component.DestroySelf();
                }
            }
            else if (this.mHpBar != null)
            {
                this.mHpBar.UpdateView();
            }
            this.isChangePlayer = false;
        }
        if (this.self.isSelected && this.outlineAnimCurve != null)
        {
            this.animTime += Time.deltaTime;
            if (this.animTime > this.outlineAnimCurveKeys[2].time)
            {
                this.animTime -= this.outlineAnimCurveKeys[2].time;
            }
            float num  = this.outlineAnimCurve.Evaluate(this.animTime);
            float num2 = num * 0.8f;
            num2 = Mathf.Clamp(num2, 0.65f, 1f);
            this.SetOutline(new Color(num2, 0f, 0f), 0.03f * num);
        }
        else
        {
            this.SetOutline(Color.black, 0.035f);
        }
    }
Exemplo n.º 12
0
 private void PlayGame(GameObject obj)
 {
     if (null != obj)
     {
         CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
         CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
     }
 }
        public override void OnLeave()
        {
            NewbieManager.Instance.EnableFakeMatchFiveTrigger();
            NewbieManager.Instance.StopFakeMatchFiveCheckFirHpLessNintyEnd();
            Singleton <NewbieView> .Instance.HideFakeMatchFiveUseRecoveryHint();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
        public override void OnLeave()
        {
            NewbieManager.Instance.EnableFakeMatchFiveTrigger();
            NewbieManager.Instance.StopFakeMatchFiveCheckFirNearFirTowerEnd();
            Singleton <NewbieView> .Instance.HideFakeMatchFiveBarrage();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
        public override void OnLeave()
        {
            NewbieManager.Instance.EleBatFiveStopCheckSelOneWay();
            NewbieManager.Instance.StopVoiceHintLoop();
            Singleton <NewbieView> .Instance.HideTitle();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
        public override void OnLeave()
        {
            Singleton <NewbieView> .Instance.HideEleHallActCloseActivity();

            Singleton <NewbieView> .Instance.HideMask();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
        public override void OnLeave()
        {
            Singleton <NewbieView> .Instance.HideSettlementBackHome();

            Singleton <NewbieView> .Instance.HideMask();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
Exemplo n.º 18
0
 private void OnMsg_OpenSacrificial(MobaMessage msg)
 {
     if (msg != null)
     {
         CtrlManager.OpenWindow(WindowID.SacrificialView, null);
         CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
     }
 }
        public override void OnLeave()
        {
            NewbieManager.Instance.EnableFakeMatchFiveTrigger();
            NewbieManager.Instance.StopFakeMatchFiveCheckFirHeroDeadEnd();
            Singleton <NewbieView> .Instance.HideFakeMatchFiveHintAttack();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
    private void OnMsg_LoadView_complete(MobaMessage msg)
    {
        MobaMessageManager.UnRegistMessage((ClientMsg)21009, new MobaMessageFunc(this.OnMsg_LoadView_complete));
        CtrlManager.CloseWindow(WindowID.LoadView);
        Singleton <SkillView> .Instance.SetGameObjectActive(true);

        base.SetGoOn();
    }
 public override void OnLeave()
 {
     NewbieManager.Instance.StopCheckSpecialEnterBattleSuc();
     NewbieManager.Instance.StopVoiceHintOnce();
     CtrlManager.CloseWindow(WindowID.SignView);
     CtrlManager.CloseWindow(WindowID.ActivityView);
     CtrlManager.CloseWindow(WindowID.NewbieLoadView);
 }
 public override void HandleAction()
 {
     NewbieManager.Instance.DisablePhaseEleHallAct();
     CtrlManager.CloseWindow(WindowID.NewbieView);
     NewbieManager.Instance.StopDisplaySubtitle();
     NewbieManager.Instance.DestroySubtitleCtrl();
     this.ClearResources();
 }
        public override void OnLeave()
        {
            Singleton <NewbieView> .Instance.HideTitle();

            CtrlManager.CloseWindow(WindowID.NewbieView);
            NewbieManager.Instance.EnableEleBatFiveTriggerCheck();
            NewbieManager.Instance.StopVoiceHintOnce();
        }
 private void GetAllGameServers()
 {
     if (NetWorkHelper.Instance.MasterServerFlag)
     {
         CtrlManager.CloseWindow(WindowID.NewWaitingView);
         SendMsgManager.SendMsgParam param = new SendMsgManager.SendMsgParam(false, "获取服务器列表...", false, 3f);
         SendMsgManager.Instance.SendMsg(MobaMasterCode.GetAllGameServers, param, new object[0]);
     }
 }
Exemplo n.º 25
0
        public override void OnLeave()
        {
            NewbieManager.Instance.EnableFakeMatchFiveTrigger();
            NewbieManager.Instance.StopFakeMatchFiveCheckFirSelUpWayEnd();
            NewbieManager.Instance.StopVoiceHintOnce();
            Singleton <NewbieView> .Instance.HideFakeMatchFiveSettingUpWay();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
        private void L2C_UserBack(MobaMessage msg)
        {
            OperationResponse operationResponse = msg.Param as OperationResponse;
            byte b = (byte)operationResponse.Parameters[0];

            byte[]      buffer      = operationResponse.Parameters[1] as byte[];
            PlayerState playerState = (PlayerState)b;

            PvpStateBase.LogState("receive L2C_UserBack " + playerState + " ");
            Singleton <PvpManager> .Instance.LoginInfo            = null;
            Singleton <PvpManager> .Instance.ServerBattleRoomInfo = null;
            this.TargetState = PlayerState.Free;
            switch (playerState)
            {
            case PlayerState.Free:
                this.RecoverFinish(new PvpStateHome());
                return;

            case PlayerState.CheckReady:
                ClientLogger.Error("Cannot be here anymore.");
                this.RecoverFinish(new PvpStateHome());
                return;

            case PlayerState.SelectHore:
            {
                CtrlManager.CloseWindow(WindowID.PvpWaitView);
                InSelectAllInfo inSelectAllInfo = SerializeHelper.Deserialize <InSelectAllInfo>(buffer);
                Singleton <PvpManager> .Instance.SetBattleInfoWithoutJoinType(inSelectAllInfo.roomInfo.battleId);

                Singleton <PvpManager> .Instance.SetRoomInfo(inSelectAllInfo.roomInfo, inSelectAllInfo.newUid, inSelectAllInfo.playerInfos, null);

                PvpMatchMgr.Instance.SelectHeroTime = new DateTime?(DateTime.Now - TimeSpan.FromTicks(inSelectAllInfo.useTime));
                this.RecoverViewsForSelectHero();
                this.RecoverFinish(new PvpStateSelectHero());
                return;
            }

            case PlayerState.Loading:
            {
                InBattleLobbyInfo inBattleLobbyInfo = SerializeHelper.Deserialize <InBattleLobbyInfo>(buffer);
                InBattleRoomInfo  inBattleRoomInfo  = SerializeHelper.Deserialize <InBattleRoomInfo>(inBattleLobbyInfo.InBattleRoomInfoBytes);
                this.RecoverFromLoadingState(inBattleRoomInfo.roomInfo, inBattleLobbyInfo.loginInfo, inBattleRoomInfo.playerInfos, false);
                this.TargetState = PlayerState.Loading;
                return;
            }

            case PlayerState.InFight:
            {
                InBattleLobbyInfo inBattleLobbyInfo2 = SerializeHelper.Deserialize <InBattleLobbyInfo>(buffer);
                InBattleRoomInfo  inBattleRoomInfo2  = SerializeHelper.Deserialize <InBattleRoomInfo>(inBattleLobbyInfo2.InBattleRoomInfoBytes);
                this.RecoverFromLoadingState(inBattleRoomInfo2.roomInfo, inBattleLobbyInfo2.loginInfo, inBattleRoomInfo2.playerInfos, true);
                this.TargetState = PlayerState.InFight;
                return;
            }
            }
            ClientLogger.Warn("L2C_UserBack: unknown state " + playerState);
        }
        public override void OnLeave()
        {
            NewbieManager.Instance.StopVoiceHintLoop();
            Singleton <NewbieView> .Instance.HideEleHallActOpenAchieve();

            Singleton <NewbieView> .Instance.HideMask();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
        public override void OnLeave()
        {
            NewbieManager.Instance.NormCastStopCheckLearnSkillFir();
            Singleton <NewbieView> .Instance.HideTitle();

            Singleton <NewbieView> .Instance.HideNormCastOpenSysSetting();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }
Exemplo n.º 29
0
        private void CloseView_ShopView()
        {
            MsgData_BattleShop_onOP param = new MsgData_BattleShop_onOP
            {
                op = EBattleShopOP.eClose
            };

            MobaMessageManagerTools.SendClientMsg(ClientC2C.BattleShop_onOP, param, false);
            CtrlManager.CloseWindow(WindowID.BattleEquipmentView);
        }
        public override void OnLeave()
        {
            NewbieManager.Instance.StopVoiceHintLoop();
            NewbieManager.Instance.HideMoveGuideLine();
            this.StopCheckPlayerReachPosition();
            this.DestroyEffectHint();
            Singleton <NewbieView> .Instance.HideTitle();

            CtrlManager.CloseWindow(WindowID.NewbieView);
        }