Ejemplo n.º 1
0
        private void RechangeOrNot()
        {
            CtrlManager.OpenWindow(WindowID.PurchasePopupView, null);
            Singleton <PurchasePopupView> .Instance.onSuccess.Add(new Callback(this.RefreshNameCardCount));

            Singleton <PurchasePopupView> .Instance.Show(ETypicalCommodity.NameCard, false);
        }
Ejemplo n.º 2
0
 private void ClickToRecharge(GameObject go)
 {
     Singleton <ShopView> .Instance.ThroughShop = ETypicalShop.Recharge;
     CtrlManager.OpenWindow(WindowID.ShopViewNew, null);
     CtrlManager.CloseWindow(WindowID.MenuBottomBarView);
     this.CloseThisWindow(null);
 }
Ejemplo n.º 3
0
        private void GoToActvityView(GameObject go)
        {
            int num             = 0;
            int activity_typeID = 100;

            if (this.skipToActive.Length > 2)
            {
                num             = int.Parse(this.skipToActive[1]);
                activity_typeID = int.Parse(this.skipToActive[2]);
            }
            if (!this.CanJumpToActive(num))
            {
                Singleton <TipView> .Instance.ShowViewSetText("暂未开放", 1f);

                return;
            }
            CtrlManager.OpenWindow(WindowID.ActivityView, null);
            MsgData_Activity_setCurActivity param = new MsgData_Activity_setCurActivity
            {
                activity_typeID = activity_typeID,
                activity_id     = num
            };

            MobaMessageManagerTools.SendClientMsg(ClientV2V.Activity_setCurActivity, param, false);
        }
Ejemplo 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);
            }
        }
 private void InitData()
 {
     CtrlManager.OpenWindow(WindowID.BarragePlayerView, null);
     Singleton <BarragePlayerCtrl> .Instance.lineNum = 3;
     ModelManager.Instance.BarrageQueue_Clear();
     this.mCoroutineMgr.StopAllCoroutine();
     this.mCoroutineMgr.StartCoroutine(this.UpdateUICompent(), true);
 }
Ejemplo n.º 6
0
        private void ChangeHeadFrame_Event(GameObject Object_1 = null)
        {
            int frame  = ModelManager.Instance.Get_userData_filed_X("PictureFrame");
            int avatar = ModelManager.Instance.Get_userData_filed_X("Avatar");

            CtrlManager.OpenWindow(WindowID.ChangeAvatarView, null);
            Singleton <ChangeAvatarView> .Instance.ReFreshUI(false, avatar, frame);
        }
Ejemplo n.º 7
0
 private void OnSuspend(GameObject objct_1 = null)
 {
     CtrlManager.OpenWindow(WindowID.ReturnView, null);
     if (!LevelManager.Instance.IsPvpBattleType)
     {
         GameManager.SetGameState(GameState.Game_Pausing);
     }
 }
Ejemplo n.º 8
0
        private void OnShowInfo(GameObject objct_1 = null)
        {
            if (Singleton <StatisticView> .Instance != null && Singleton <StatisticView> .Instance.gameObject == null)
            {
                Singleton <StatisticView> .Instance.SetModel(true);

                CtrlManager.OpenWindow(WindowID.StatisticView, null);
            }
        }
Ejemplo n.º 9
0
        private void OnMsg_GetRedPackets(MobaMessage msg)
        {
            if (msg == null)
            {
                return;
            }
            OperationResponse operationResponse = msg.Param as OperationResponse;

            if (operationResponse != null)
            {
                int           num           = (int)operationResponse.Parameters[1];
                MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
                if (mobaErrorCode != MobaErrorCode.Ok)
                {
                    if (mobaErrorCode == MobaErrorCode.NotInRedPacketTime)
                    {
                        this.ZaixianPacket.gameObject.SetActive(false);
                    }
                }
                else
                {
                    byte[]                   buffer         = (byte[])operationResponse.Parameters[84];
                    byte[]                   buffer2        = (byte[])operationResponse.Parameters[202];
                    byte[]                   buffer3        = (byte[])operationResponse.Parameters[88];
                    byte[]                   buffer4        = (byte[])operationResponse.Parameters[246];
                    byte[]                   buffer5        = (byte[])operationResponse.Parameters[146];
                    RedPacketsData           redPacketsData = SerializeHelper.Deserialize <RedPacketsData>(buffer);
                    List <EquipmentInfoData> list           = SerializeHelper.Deserialize <List <EquipmentInfoData> >(buffer2);
                    List <HeroInfoData>      list2          = SerializeHelper.Deserialize <List <HeroInfoData> >(buffer3);
                    List <DropItemData>      list3          = SerializeHelper.Deserialize <List <DropItemData> >(buffer4);
                    List <DropItemData>      listRepeatItem = SerializeHelper.Deserialize <List <DropItemData> >(buffer5);
                    ToolsFacade.Instance.GetRewards_WriteInModels_WithoutShowEffect(list, list2, list3, listRepeatItem, null);
                    CtrlManager.OpenWindow(WindowID.RedPacketView, null);
                    if (list3 != null && list3.Count > 0)
                    {
                        Singleton <RedPacketView> .Instance.UpdateGiftData(list3[0]);
                    }
                    else if (list != null && list.Count > 0)
                    {
                        Singleton <RedPacketView> .Instance.UpdateGiftData(list[0]);
                    }
                    else if (list2 != null && list2.Count > 0)
                    {
                        Singleton <RedPacketView> .Instance.UpdateGiftData(list2[0]);
                    }
                    this.cor.StopCoroutine(this.TimeChecker);
                    if (redPacketsData.timeleft != 0)
                    {
                        this.StopTimeChecker();
                        this.TimeChecker = this.cor.StartCoroutine(this.CheckTime(), true);
                    }
                    this.PacketsData(redPacketsData);
                    this.isClick = false;
                    this.lastone = Tools_TimeCheck.ServerCurrentTime;
                }
            }
        }
Ejemplo n.º 10
0
        private void DoPopView(PopViewParam param)
        {
            CtrlManager.OpenWindow(WindowID.NewPopView, null);
            NewPopView ctrl = CtrlManager.GetCtrl <NewPopView>(WindowID.NewPopView);

            if (ctrl != null)
            {
                ctrl.SetParam(param);
            }
        }
Ejemplo n.º 11
0
 private void GoToSign(GameObject go)
 {
     if (this.CanJumpToSign())
     {
         CtrlManager.OpenWindow(WindowID.SignView, null);
     }
     else
     {
         Singleton <TipView> .Instance.ShowViewSetText("暂未开放", 1f);
     }
 }
Ejemplo n.º 12
0
 private void TryShow()
 {
     if (Singleton <CharacterView> .Instance == null)
     {
         CtrlManager.OpenWindow(WindowID.CharacterView, null);
     }
     if (this.gameObject == null)
     {
         CtrlManager.OpenWindow(WindowID.CharacterView, null);
     }
 }
Ejemplo n.º 13
0
 private void CheckShowType()
 {
     if (this.showType == 2 && this.showIndex < this.infoList.Count - 1)
     {
         this.showIndex++;
         this.text_str = this.infoList[this.showIndex][0];
         this.effectId = this.infoList[this.showIndex][1];
         this.canClick = true;
         CtrlManager.OpenWindow(WindowID.UnlockView, null);
     }
 }
Ejemplo n.º 14
0
 public override void Init()
 {
     base.Init();
     this._components = this.uiWindow.GetComponent <ObserveViewComponents>();
     UIEventListener.Get(this._components.Background).onDragStart         = new UIEventListener.VoidDelegate(this.OnDragStart);
     UIEventListener.Get(this._components.Background).onDragEnd           = new UIEventListener.VoidDelegate(this.OnDragEnd);
     UIEventListener.Get(this._components.Background).onDrag              = new UIEventListener.VectorDelegate(this.OnDrag);
     UIEventListener.Get(this._components.BtnSettings.gameObject).onClick = delegate
     {
         CtrlManager.OpenWindow(WindowID.ReturnView, null);
     };
 }
Ejemplo n.º 15
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);
     }
 }
Ejemplo n.º 16
0
 public void ShowViewSetText(string text, float time = 1f)
 {
     this.text_str = text;
     CtrlManager.OpenWindow(WindowID.TipView, null);
     if (this.time_out == null)
     {
         this.time_out = this.transform.GetComponent <TimeoutController>();
     }
     if (this.time_out == null)
     {
         this.time_out = this.gameObject.AddComponent <TimeoutController>();
     }
     this.SetTime(time);
 }
Ejemplo n.º 17
0
        private void GoToShop(GameObject go)
        {
            CtrlManager.OpenWindow(WindowID.PurchasePopupView, null);
            Singleton <PurchasePopupView> .Instance.onSuccess.Add(new Callback(this.AfterBuyAvatar));

            if (this.isHeadPortraitPanel)
            {
                Singleton <PurchasePopupView> .Instance.Show(GoodsSubject.HeadPortrait, this.selectPortraitName, 1, false);
            }
            else
            {
                Singleton <PurchasePopupView> .Instance.Show(GoodsSubject.HeadPortraitFrame, this.selectPortraitName, 1, false);
            }
        }
Ejemplo n.º 18
0
        private void ClickBannerItem(GameObject obj)
        {
            if (this.info == null)
            {
                return;
            }
            CtrlManager.OpenWindow(WindowID.ActivityView, null);
            MsgData_Activity_setCurActivity param = new MsgData_Activity_setCurActivity
            {
                activity_typeID = this.info.activityConfig.activity_type_id,
                activity_id     = this.info.activityConfig.id
            };

            MobaMessageManagerTools.SendClientMsg(ClientV2V.Activity_setCurActivity, param, false);
        }
Ejemplo n.º 19
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);
     }
 }
Ejemplo n.º 20
0
 public void AddInvitation(string id, string title, string content, string summerId, InvitateType type = InvitateType.KHOrZDY)
 {
     if (SceneManager.Instance.CurSceneType == SceneType.Home && !Singleton <PvpRoomView> .Instance.IsOpen && !Singleton <PvpSelectHeroView> .Instance.IsOpen)
     {
         if (!Singleton <InvitationView> .Instance.IsOpen)
         {
             CtrlManager.OpenWindow(WindowID.InvitationView, null);
         }
         this.coroutineManager.StartCoroutine(this.AddOneNotice(id, title, content, summerId, type), true);
     }
     else
     {
         this.SaveInvitation(id, title, content, summerId, type);
     }
 }
        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);
        }
Ejemplo n.º 22
0
 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);
 }
Ejemplo n.º 23
0
        public void OnMsg_RichManGiftMgr(MobaMessage msg)
        {
            if (msg == null)
            {
                return;
            }
            OperationResponse operationResponse = msg.Param as OperationResponse;

            if (operationResponse != null)
            {
                bool flag = (bool)operationResponse.Parameters[1];
                if (flag)
                {
                    int num = (int)operationResponse.Parameters[30];
                    if (num == 1)
                    {
                        this.TuhaoCount = (int)operationResponse.Parameters[55];
                        this.UpdateTuhaoHongBao();
                    }
                    else if (num == 2)
                    {
                        int    type  = (int)operationResponse.Parameters[234];
                        int    count = (int)operationResponse.Parameters[101];
                        string name  = (string)operationResponse.Parameters[59];
                        bool   flag2 = (bool)operationResponse.Parameters[176];
                        CtrlManager.OpenWindow(WindowID.RedPacketView, null);
                        Singleton <RedPacketView> .Instance.UpdateGiftData(type, count, name);

                        this.TuhaoCount--;
                        this.UpdateTuhaoHongBao();
                        if (flag2)
                        {
                            this.SendTrumpet(type, count, name);
                        }
                    }
                    else
                    {
                        this.TuhaoPacket.gameObject.SetActive(false);
                    }
                }
            }
            else
            {
                this.TuhaoPacket.gameObject.SetActive(false);
            }
        }
Ejemplo n.º 24
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);
         }
     }
 }
Ejemplo n.º 25
0
        public void ConfirmSendMessage(GameObject obj)
        {
            if (null != obj)
            {
                if (HomeChatCtrl.GetInstance().sendState == SendState.Sending)
                {
                    return;
                }
                UserData userData = ModelManager.Instance.Get_userData_X();
                if (userData.Speaker <= 0)
                {
                    CtrlManager.OpenWindow(WindowID.PurchasePopupView, null);
                    Singleton <PurchasePopupView> .Instance.onSuccess.Add(new Callback(this.AfterBuying));

                    Singleton <PurchasePopupView> .Instance.Show(GoodsSubject.Currency, "11", 1, false);

                    return;
                }
                if (this.content.value.Length > 28)
                {
                    Singleton <TipView> .Instance.ShowViewSetText("最多发送28个字!!!", 1f);

                    return;
                }
                HomeChatCtrl.GetInstance().sendState = SendState.Sending;
                this.GetSetEmojiPanelState(false);
                string        nickName       = ModelManager.Instance.Get_userData_X().NickName;
                long          userId         = long.Parse(ModelManager.Instance.Get_userData_X().UserId);
                int           userLevel      = CharacterDataMgr.instance.GetUserLevel(ModelManager.Instance.Get_userData_X().Exp);
                int           ladder         = ToolsFacade.Instance.ToInt32(ModelManager.Instance.Get_userData_X().LadderScore);
                int           botLevel       = ModelManager.Instance.Get_BottleData_Level();
                int           head           = ModelManager.Instance.Get_userData_filed_X("Avatar");
                int           headFrame      = ModelManager.Instance.Get_userData_filed_X("PictureFrame");
                int           charmRankvalue = ModelManager.Instance.Get_userData_filed_X("CharmRankValue");
                string        value          = this.content.value;
                AgentBaseInfo client         = new AgentBaseInfo
                {
                    NickName       = nickName,
                    UserId         = userId,
                    head           = head,
                    headFrame      = headFrame,
                    Level          = userLevel,
                    Ladder         = ladder,
                    BotLevel       = botLevel,
                    CharmRankvalue = charmRankvalue
                };
                if (!ToolsFacade.Instance.IsLegalString(ref value))
                {
                    Debug.LogError("return");
                    HomeChatCtrl.GetInstance().sendState = SendState.Nothing;
                    return;
                }
                ChatMessageNew data = new ChatMessageNew
                {
                    Client   = client,
                    ChatType = 8,
                    Message  = value,
                    TargetId = null,
                    TimeTick = ToolsFacade.ServerCurrentTime.Ticks
                };
                Dictionary <byte, object> dictionary = new Dictionary <byte, object>();
                dictionary.Add(100, SerializeHelper.Serialize <ChatMessageNew>(data));
                SendMsgManager.SendMsgParam sendMsgParam = new SendMsgManager.SendMsgParam(true, "正在发送...", false, 15f);
                NetWorkHelper.Instance.client.SendSessionChannelMessage(2, MobaChannel.Chat, dictionary);
                this.content.defaultText = "点此输入文字";
            }
        }
Ejemplo n.º 26
0
 private void OpenBottleBook(GameObject go)
 {
     MobaMessageManagerTools.BeginWaiting_manual("WaittingForBottleBook", "正在解析数据...", true, 15f, true);
     CtrlManager.OpenWindow(WindowID.BottleBookView, null);
 }
Ejemplo n.º 27
0
 private void OnClickCapShop(GameObject go)
 {
     Singleton <ShopView> .Instance.ThroughShop = ETypicalShop.CapShop;
     CtrlManager.OpenWindow(WindowID.ShopViewNew, null);
 }
Ejemplo n.º 28
0
        public void ShowDetailsInfo(string userinfo)
        {
            string text;
            string text2;

            if (userinfo.Contains('|'))
            {
                string[] array = userinfo.Split(new char[]
                {
                    '|'
                });
                text  = array[0];
                text2 = array[1];
            }
            else
            {
                text  = userinfo;
                text2 = string.Empty;
            }
            PlayerData playerData = ModelManager.Instance.Get_GetPlayerData_X();

            if (playerData == null)
            {
                return;
            }
            string b = ToolsFacade.ServerCurrentTime.ToString("y-M-d");

            CtrlManager.OpenWindow(WindowID.DetailsInfo, null);
            this.transform.localPosition = new Vector3(-373.8f, 84.21f, 0f);
            this.transform.name          = text;
            SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(playerData.Icon.ToString());

            if (dataById == null)
            {
                ClientLogger.Error("  Can't find Headportrait id=" + playerData.Icon + " in SysSummonersHeadportraitVo");
            }
            else
            {
                this.Portrait.mainTexture = ResourceManager.Load <Texture>(dataById.headportrait_icon.ToString(), true, true, null, 0, false);
            }
            SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(playerData.Icon2.ToString());

            if (dataById2 == null)
            {
                ClientLogger.Error("  Can't find Headportrait frame id=" + playerData.Icon2 + " in SysSummonersPictureframeVo");
            }
            else
            {
                this.PortraitFrame.spriteName = dataById2.pictureframe_icon;
            }
            this.Name.text = playerData.SummName;
            this.Name.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(playerData.CharmRankvalue);
            this.SummonerLv.text = CharacterDataMgr.instance.GetUserLevel(playerData.SummLevel).ToString();
            this.MobaID.text     = "(魔霸号:" + playerData.SummId + ")";
            this.LikeCount.text  = ModelManager.Instance.Get_GetPlayerData_X().likeCount.ToString();
            if (text == ModelManager.Instance.Get_userData_X().UserId)
            {
                this.LikeBth.gameObject.SetActive(false);
                this.LikeCount.gameObject.SetActive(false);
            }
            else
            {
                this.LikeBth.gameObject.SetActive(true);
                this.LikeCount.gameObject.SetActive(true);
            }
            this.GetState((double)playerData.LadderScore, playerData.LadderRank);
            int level = (playerData.bottlelevel != 0) ? playerData.bottlelevel : 1;

            this.MagicIcon.mainTexture = ResourceManager.Load <Texture>(Tools_ParsePrice.BottleLevelParse(level), true, true, null, 0, false);
            if (playerData.battleinfos != null)
            {
                this.BattleInfo(playerData.battleinfos);
            }
            this.Charm.text       = playerData.usercp.ToString();
            this.MagicRank.text   = text2;
            this.PentaKill.text   = playerData.pentaKill.ToString();
            this.QuataryKill.text = playerData.quadraKill.ToString();
            this.TripleKill_.text = playerData.tripleKill.ToString();
            this.Legendary.text   = playerData.godlike.ToString();
            if (PlayerPrefs.GetString(text) == b)
            {
                this.LikeBth.GetComponent <UISprite>().spriteName    = "Settlement_praise_02";
                UIEventListener.Get(this.LikeBth.gameObject).onClick = null;
            }
            else
            {
                this.LikeBth.GetComponent <UISprite>().spriteName    = "Settlement_praise_01";
                UIEventListener.Get(this.LikeBth.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickLikeBtn);
            }
        }
Ejemplo n.º 29
0
 private void GoToTaskView(GameObject go)
 {
     CtrlManager.OpenWindow(WindowID.TaskView, null);
     Singleton <TaskView> .Instance.ClickPanel(this.skipPage);
 }
Ejemplo n.º 30
0
 private void SystemBlackList_Event(GameObject Object_1 = null)
 {
     CtrlManager.CloseWindow(WindowID.SystemSettingView);
     CtrlManager.OpenWindow(WindowID.BlackListView, null);
 }