protected override async void Run(ETModel.Session session, Actor_FiveStar_Deal message)
        {
            UIComponent.GetUiView <SelectPiaoNumPanelComponent>().Hide();                   //隐藏打漂面板
            EventMsgMgr.SendEvent(CardFiveStarEventID.ZhiSeZi);                             //发起玩家置赛事件
            await UIComponent.GetUiView <SifterAnimPanelComponent>().RandomPlaySifterNum(); //先掷筛子

            EventMsgMgr.SendEvent(CardFiveStarEventID.Deal, message.Cards);
        }
 public void InitEnterRoomUI()
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.EnrerRoom);
     ShowUserPlayerInfo();
     JoyLandlordsOperationControl.Ins.ShowBtnType(JoyLandlordsOperationType.StartGame);
     mMathInText.gameObject.SetActive(false);
     DetroyLandlordThreeCard();
 }
Пример #3
0
 //房卡模式正常进入进入游戏 加入房间 创建房间 在等待开局状态重连
 public static void RoomCardEnterRoom(RoomInfo roomInfo)
 {
     Game.Scene.GetComponent <ToyGameComponent>().StartGame(ToyGameId.CardFiveStar, roomInfo.RoomConfigLists, roomInfo.RoomId, RoomType.RoomCard);
     CardFiveStarRoom.Ins._RoomState       = RoomStateType.AwaitPerson;                    //状态改为等待中
     CardFiveStarRoom.Ins._FriendsCircleId = roomInfo.FriendsCircleId;                     //更改亲友圈id
     EventMsgMgr.SendEvent(CardFiveStarEventID.HideAllPlayer);                             //先隐藏所有玩家
     CardFiveStarRoom.Ins.ShowPlayerInfo(roomInfo.MatchPlayerInfos);                       //显示服务器发过来的玩家信息
     UIComponent.GetUiView <CardFiveStarRoomPanelComponent>().CutRoomCardEnterReadyInUI(); //UI切换为房卡等待开始
 }
Пример #4
0
 //切换准备开始匹配中的UI
 public void CutBeginStartPrepareUI()
 {
     mMatchBtn.gameObject.SetActive(true);
     mMatchingInGo.SetActive(false);
     mReidueCardNumBgGo.SetActive(false);
     mInviteBtn.gameObject.SetActive(false);
     mTimeTurntableGo.SetActive(false);
     EventMsgMgr.SendEvent(CardFiveStarEventID.CutBeginStartPrepare);
     ShowRoomInfo();
 }
Пример #5
0
 //切换游戏中的UI
 public void CutGameInUI()
 {
     mMilitaryBtn.gameObject.SetActive(CardFiveStarRoom.Ins._RoomType == RoomType.RoomCard);//战绩按钮 只有房卡模式才显示
     mMatchBtn.gameObject.SetActive(false);
     mMatchingInGo.SetActive(false);
     mTimeTurntableGo.SetActive(true);
     mInviteBtn.gameObject.SetActive(false);
     EventMsgMgr.SendEvent(CardFiveStarEventID.CutGameIn);
     ShowRoomInfo();
 }
 public void NormalWanFaToggleEvent(bool isOn)
 {
     if (isOn)
     {
         CurrSelectWanFa = FrienCircleWanFaType.Normal;
         EventMsgMgr.SendEvent(CommEventID.FrienCircleCutShowWanFa);
         mWanFaDescBgGo.SetActive(true);
         mNoneRoomGo.SetActive(false);
     }
 }
Пример #7
0
        public async void Location(string message)
        {
            S2C_UploadingLocationIp s2CUploading = (S2C_UploadingLocationIp)await SessionComponent.Instance.Session.Call(new C2G_UploadingLocationIp()
            {
                Location = message
            });

            UserComponent.Ins.pSelfUser.Ip       = s2CUploading.Ip;
            UserComponent.Ins.pSelfUser.Location = message;
            EventMsgMgr.SendEvent(CommEventID.SelfUserInfoRefresh);
        }
Пример #8
0
 //切换匹配中的UI
 public void CutMatchingUI()
 {
     if (CardFiveStarRoom.Ins._RoomState == RoomStateType.GameIn)
     {
         return;
     }
     EventMsgMgr.SendEvent(CardFiveStarEventID.CutMatchIn);
     mMatchBtn.gameObject.SetActive(false);
     mTimeTurntableGo.SetActive(false);
     mReidueCardNumBgGo.SetActive(false);
     mMatchingInGo.SetActive(true);
     UIComponent.GetUiView <FiveStarMingPaiHintPanelComponent>().Hide();//隐藏胡牌提示
 }
Пример #9
0
        private async void GetAwardBtnEvent()
        {
            L2C_TodaySignIn g2CTodaySign = (L2C_TodaySignIn)await SessionComponent.Instance.Session.Call(new C2L_TodaySignIn());

            if (g2CTodaySign.Error == 0)
            {
                EventMsgMgr.SendEvent(CommEventID.UserFinshSignIn, ++mData.UserSinginInfo.SingInDays);
            }
            else
            {
                UIComponent.GetUiView <NormalHintPanelComponent>().ShowHintPanel(g2CTodaySign.Message);
            }
            FinshSingIn();
        }
        //收到出牌消息
        public async void  ChuCard(int card)
        {
            UIComponent.GetUiView <CanOpertionPanelComponent>().Hide();//隐藏可操作列表
            _IsCanChuCard = false;
            EventMsgMgr.SendEvent(CardFiveStarEventID.UserChuCard);
            UIComponent.GetUiView <FiveStarMingPaiHintPanelComponent>().HideHuCardHint(0); //隐藏胡牌提示
            _NewHand.SetActive(false);
            if (UpChuCardHand == null || UpChuCardHand.CardSize != card)                   //托管状态下 上个出牌的对象可能不准需要判断一下
            {
                UpChuCardHand = _NewHand;
            }
            await  PlayCardAnimation();

            CancelPartyHand();//出完牌取消预选牌
        }
        //检测出牌的胡牌提示和 是否可以亮倒
        public void DetectionChuCardHintAndLiang()
        {
            _isSelectLiang = false;
            if (CardFiveStarRoom.Ins.GetUserPlayerInfo().IsLiangDao)
            {
                return;                                                                    //已经亮了 就不用检测了
            }
            _HuCardInMultiple.Clear();                                                     //清空 胡的牌 和对应的倍数
            UIComponent.GetUiView <FiveStarMingPaiHintPanelComponent>().HideHuCardHint(0); //先隐藏胡牌提示
            Dictionary <int, List <int> > chuCardHuDic = CardFiveStarHuPaiLogic.HuPaiTiShi(_NewestHands);

            if (chuCardHuDic.Count > 0)
            {
                EventMsgMgr.SendEvent(CardFiveStarEventID.CanChuCardHaveHuHint, chuCardHuDic);
                UIComponent.GetUiView <CanOpertionPanelComponent>().ShowCanOpration(FiveStarOperateType.Liang);
            }
        }
Пример #12
0
 public void FreedomWanFaToggleEvent(bool isOn)
 {
     if (isOn)
     {
         CurrSelectWanFa = FrienCircleWanFaType.Freedom;
         EventMsgMgr.SendEvent(CommEventID.FrienCircleCutShowWanFa);
         mWanFaDescBgGo.SetActive(false);
         mNoneRoomGo.SetActive(true);
         for (int i = 0; i < mRoomItemGo.transform.parent.childCount; i++)
         {
             if (mRoomItemGo.transform.parent.GetChild(i).gameObject.activeInHierarchy)
             {
                 mNoneRoomGo.SetActive(false);
                 break;
             }
         }
     }
 }
        //亮倒
        public void LiangDao(RepeatedField <int> hands, bool isShowSpecial = true)
        {
            IsLiangDao = true;
            if (isShowSpecial)
            {
                OperationSpecialMgr.Ins.ShowSpecial(FiveStarOperateType.Liang, _OperationSpecialPoint); //亮倒 特效
                CardFiveStarSoundMgr.Ins.PlaySound(_user.Sex, FiveStarOperateType.Liang);               //亮倒 音效
            }
            List <int> tingCards = CardFiveStarHuPaiLogic.IsTingPai(hands);

            UIComponent.GetUiView <FiveStarMingPaiHintPanelComponent>().ShowMingCardHint(ClientSeatIndex, tingCards);
            ClearHand();
            ShowLiangDaoCards(hands);
            CardFiveStarRoom.Ins.AddLiangDaoCanHuCards(ClientSeatIndex, tingCards);
            if (ClientSeatIndex != 0)
            {
                CardFiveStarRoom.Ins.ReduceCardInNum(hands); //删除牌的剩余数量
            }
            EventMsgMgr.SendEvent(CardFiveStarEventID.PlayerLiangDao);
        }
Пример #14
0
        public void GetGoodss(List <GetGoodsOne> goodss, bool isShowHintPanel)
        {
            foreach (var goods in goodss)
            {
                switch (goods.GoodsId)
                {
                case GoodsId.Jewel:
                    pSelfUser.Jewel = goods.NowAmount;
                    break;

                case GoodsId.Besans:
                    pSelfUser.Beans = goods.NowAmount;
                    break;
                }
            }
            if (isShowHintPanel)
            {
                EventMsgMgr.SendEvent(CommEventID.GetGodds, goodss);
            }
            EventMsgMgr.SendEvent(CommEventID.SelfUserInfoRefresh);
        }
Пример #15
0
        //录像房间信息初始化
        private void GameInit(Video_GameInit gameInit)
        {
            if (_PlayerDic.Count > 0)
            {
                return;
            }

            //初始化房间信息
            _RoomConfig = FiveStarRoomConfigFactory.Create(gameInit.RoomConfigs);
            string roomInfo = "房号:" + gameInit.RoomNumber + "      " + gameInit.OfficeNumber + "/" +
                              _RoomConfig.MaxJuShu + "局      " + _RoomConfig.RoomNumber + "人局";

            _CurrRoomOffice = gameInit.OfficeNumber;
            _roomPanel.SetRoomInfo(roomInfo);
            //先隐藏所有玩家头像
            EventMsgMgr.SendEvent(CardFiveStarEventID.HideAllPlayer);

            //先记录出当前位置的服务器
            int selfSelfIndex = 0;

            for (int i = 0; i < gameInit.PlayerInfos.Count; i++)
            {
                if (gameInit.PlayerInfos[i].UserId == UserComponent.Ins.pUserId)
                {
                    selfSelfIndex = i;
                    break;
                }
            }
            //创建玩家头像信息
            for (int i = 0; i < gameInit.PlayerInfos.Count; i++)
            {
                User user = new User();
                user.Name     = gameInit.PlayerInfos[i].Name;
                user.Icon     = gameInit.PlayerInfos[i].Icon;
                user.UserId   = gameInit.PlayerInfos[i].UserId;
                user.IsOnLine = true;
                CardFiveStarPlayer player = CardFiveStarPlayerFactory.Creator(user, i, selfSelfIndex, _RoomConfig.RoomNumber, _roomPanel.mPlayerUIsGo.transform, gameInit.PlayerInfos[i].NowScore);//创建用户
                _PlayerDic[gameInit.PlayerInfos[i].SeatIndex] = player;
            }
        }
Пример #16
0
 public void ReceiveChatInfo(long sendUserId, ChatInfo chatInfo)
 {
     EventMsgMgr.SendEvent(CommEventID.ReceiveChatInfo, sendUserId, chatInfo);
 }
Пример #17
0
 public void ExitRoomEvnet()
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.RequestOutRoom);
 }
 public void CancelLiangBtnEvent()
 {
     _LiangPaiSelctGo.SetActive(false);
     _LiangBtn.gameObject.SetActive(true);
     EventMsgMgr.SendEvent(CardFiveStarEventID.PlayerSelectLiangCardState, false);
 }
 protected override void Run(ETModel.Session session, Actor_JoyLds_Prepare message)
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.Prepare, message.SeatIndex);
 }
Пример #20
0
 public void Hinit()
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.PlayCardHint);
 }
Пример #21
0
 protected override void Run(ETModel.Session session, Actor_JoyLds_PlayCard message)
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.PlayCard, message.SeatIndex, message.PlayCardType, message.Cards, message.Hands);
 }
 protected override void Run(ETModel.Session session, Actor_JoyLds_GameResult message)
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.GameResult, message.PlayerResults);
 }
Пример #23
0
 //显示的时候发送自己显示的事件
 public override void OnShowBefore()
 {
     base.OnShowBefore();
     EventMsgMgr.SendEvent(CommEventID.OnOtherNormalViewShow, this.pViewType);
 }
 protected override void Run(ETModel.Session session, Actor_UserOffline message)
 {
     EventMsgMgr.SendEvent(CommEventID.UserOffLine, message.UserId);//玩家下线
 }
Пример #25
0
 public void PlayCard()
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.RequestPlayCard);
 }
Пример #26
0
 protected override void Run(ETModel.Session session, Actor_JoyLds_CallLanlord message)
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.CallLanlord, message.SeatIndex, message.Result);
 }
 protected override void Run(ETModel.Session session, Actor_JoyLds_ConfirmCamp message)
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.ConfirmCamp, message.LandlordSeatIndex, message.Hands, message.LandlordThreeCard);
 }
Пример #28
0
 public void StarMathch()
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.StarMathch);
 }
Пример #29
0
 protected override void Run(ETModel.Session session, Actor_JoyLds_AnewDeal message)
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.AnewDeal);
 }
Пример #30
0
 protected override void Run(ETModel.Session session, Actor_JoyLds_CanAddTwice message)
 {
     EventMsgMgr.SendEvent(JoyLandlordsEventID.CanAddTwice);
 }