Beispiel #1
0
        /// <summary>
        /// 通过名字显示玩家状态
        /// </summary>
        /// <param name="type">当前玩家状态,对应游戏状态</param>
        /// <param name="betgold"></param>
        public virtual void PlayTypeSound(GameRequestType type, int betgold = 0)
        {
            switch (type)
            {
            case GameRequestType.BetSpeak:
                PlaySound("BetSpeak");          //只有一个,不用随机
                break;

            case GameRequestType.Bet:
                break;

            case GameRequestType.Fold:
                PlaySound("Fold" + Random.Range(1, 4));      //三个声音随机一个
                break;

            case GameRequestType.FollowSpeak:
                PlaySound("Follow" + Random.Range(1, 4));           //三个声音随机
                break;

            case GameRequestType.KickSpeak:
                PlaySound("KickSpeak" + Random.Range(1, 3));        //两个声音随机
                break;

            case GameRequestType.NotKick:
                PlaySound("NotKick" + Random.Range(1, 4));          //三个声音随机
                break;

            case GameRequestType.BackKick:

                PlaySound("BackKick" + Random.Range(1, 3));         //两个声音随机
                break;
            }
        }
Beispiel #2
0
        public virtual void ShowGameType(GameRequestType type)
        {
            switch (type)
            {
            case GameRequestType.Fold:
                GameTypeSprite.spriteName = "Fold";
                GameTypeSprite.gameObject.SetActive(true);
                break;

            case GameRequestType.KickSpeak:
                GameTypeSprite.spriteName = "KickSpeak";
                GameTypeSprite.gameObject.SetActive(true);
                break;

            case GameRequestType.NotKick:
                GameTypeSprite.spriteName = "NotKick";
                GameTypeSprite.gameObject.SetActive(true);
                break;

            case GameRequestType.BackKick:
                GameTypeSprite.spriteName = "BackKick";
                GameTypeSprite.gameObject.SetActive(true);
                break;

            default:
                GameTypeSprite.gameObject.SetActive(false);
                break;
            }
        }
Beispiel #3
0
        /// <summary>
        /// 发送交互信息
        /// </summary>
        /// <param name="rt">游戏状态</param>
        /// <param name="data">下注金额键值对,key为gold</param>
        public void SendRequest(GameRequestType rt, IDictionary data)
        {
            YxDebug.Log("!!SendRequest == " + rt);
            if (!HasGetGameInfo)
            {
                YxDebug.LogError("GameInfo还没有初始化!!");
                return;
            }
            SFSObject sfsObject = new SFSObject();

            switch (rt)
            {
            case GameRequestType.UserBet:
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("seat", (int)data["seat"]);
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.PutCard:
                sfsObject.PutInt("cards", (int)data["gold"]);
                sfsObject.PutInt("seat", (int)data["seat"]);
                sfsObject.PutInt("type", (int)GameRequestType.PutCard);
                break;

            case GameRequestType.AllowStart:
                sfsObject.PutInt("type", (int)GameRequestType.AllowStart);
                break;
            }
            YxDebug.Log("发送数据:");
            SendGameRequest(sfsObject);
            YxDebug.Log(" ----- 发送结束 ----- ");
        }
Beispiel #4
0
        public override void ShowGameType(GameRequestType type)
        {
            switch (type)
            {
            case GameRequestType.Fold:
                FoldMark.SetActive(true);
                break;

            case GameRequestType.KickSpeak:
            case GameRequestType.NotKick:
            case GameRequestType.BackKick:
            case GameRequestType.FollowSpeak:
                string text = GetTypeLabelText.GetLabeText(type);
                TypeLabel.text = text;
                TypeLabel.gameObject.SetActive(true);
                break;

            case GameRequestType.Bet:
                int    gold   = App.GetGameData <FillpitGameData>().LastBetValue;
                string format = GetTypeLabelText.GetLabeText(type);
                TypeLabel.text = string.Format(format, YxUtiles.ReduceNumber(gold));
                TypeLabel.gameObject.SetActive(true);
                break;
            }
        }
Beispiel #5
0
        /// <summary>
        /// 发送交互信息
        /// </summary>
        /// <param name="rt"></param>
        /// <param name="data"></param>
        public void SendRequest(GameRequestType rt, IDictionary data)
        {
            YxDebug.Log("SendRequest == " + rt);

            if (!App.GetGameData <GangwuGameData>().IsGameInfo)
            {
                YxDebug.LogError("GameInfo还没有初始化!!");
                return;
            }
            SFSObject sfsObject = new SFSObject();

            switch (rt)
            {
            case GameRequestType.Bet:
            case GameRequestType.AdvanceBet:
                if (!data.Contains("gold"))
                {
                    UnityEngine.Debug.LogError("没有Gold");
                }
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.Fold:
                sfsObject.PutInt("type", (int)rt);
                break;
            }

            YxDebug.Log("发送数据:");
            YxDebug.TraceSfsObject(sfsObject);

            SendGameRequest(sfsObject);
        }
Beispiel #6
0
 public void HideSpeak(GameRequestType rt)
 {
     switch (rt)
     {
     case GameRequestType.Bet:
         SetItemActive(Pages, "AddBetBtns", false);
         SetBtnState("AddBtn", false);
         SetBtnState("FollowBtn", false);
         SetItemActive(Pages, "LastTurnBtns", false);
         SetItemActive(Pages, "QiLiBtns", false);
         break;
     }
 }
Beispiel #7
0
 public void SendRequest(GameRequestType rt, IDictionary data)
 {
     if (!App.GetGameData <DuifenGlobalData>().IsGameInfo)
     {
         YxDebug.LogError("GameInfo还没有初始化!!");
         return;
     }
     if (!CouldSendRequest())
     {
         YxDebug.Log("发送数据过于频繁,请稍后发送");
         return;
     }
     App.GetRServer <DuifenGameServer>().SendRequest(rt, data);
 }
Beispiel #8
0
        /// <summary>
        /// 获取计时说明图片
        /// </summary>
        /// <param name="type">当前游戏阶段</param>
        /// <returns></returns>
        private string GetSprName(GameRequestType type)
        {
            switch (type)
            {
            case GameRequestType.BeginBet:
                return("bettime");

            case GameRequestType.SendCard:
                return("cardtime");

            default:
                return(string.Empty);
            }
        }
Beispiel #9
0
        /// <summary>
        /// 显示说话界面
        /// </summary>
        public virtual void ShowSpeak(GameRequestType rt)
        {
            YxDebug.Log("ShowSpeak rt === " + rt);
            if (rt == GameRequestType.None)
            {
                return;
            }

            RefreshBetSpeakBtns();

            if (IsAutoFollow)
            {
                AutoFollow();
                return;
            }

            switch (rt)
            {
            case GameRequestType.Cards:
                var  curTurn    = App.GetGameManager <DuifenGameManager>().CurTurn;
                bool finishCard = curTurn >= 3;       //是否发完牌
                SetItemActive(Pages, "LastTurnBtns", finishCard);
                SetItemActive(Pages, "AddBetBtns", true);
                SetBtnState("AddBtn", true);
                SetBtnState("KaiPaiBtn", false);
                RefreshBetBtnsEnable();

                if (finishCard)
                {
                    SetItemActive(Buttons, "QiLiBtn", curTurn == 3);
                }
                break;

            case GameRequestType.Fold:
            case GameRequestType.Bet:

                ShowBetBtns();

                break;

            case GameRequestType.QiLi:

                SetItemActive(Pages, "LastTurnBtns", true);
                ShowBetBtns();
                SetItemActive(Buttons, "QiLiBtn", true);
                SetItemActive(Pages, "QiLiBtns", true);
                SetBtnState("KaiPaiBtn", false);
                break;
            }
        }
Beispiel #10
0
        /// <summary>
        /// 显示说话界面
        /// </summary>
        public void ShowSpeak(GameRequestType rt)
        {
            var panel = App.GameData.GetPlayer <PlayerPanel>();

            panel.PlayerType = (int)rt;

            switch (rt)
            {
            case GameRequestType.BetSpeak:
                Tools.GobShowOnlyOne(Pages, FirstSpeakPageName);
                _prePageName = "BetSpeakBtns";
                break;

            case GameRequestType.KickSpeak:
                Tools.GobShowOnlyOne(Pages, "KickSpeakBtns");
                _prePageName = "KickSpeakBtns";

                break;

            case GameRequestType.BackKick:
                Tools.GobShowOnlyOne(Pages, "BackKickSpeakBtns");
                _prePageName = "BackKickSpeakBtns";
                break;

            case GameRequestType.FollowSpeak:
                var gdata   = App.GetGameData <FillpitGameData>();
                int lastBet = gdata.LastBetValue;
                if (lastBet > 0 ||
                    lastBet > gdata.GetPlayer <PlayerPanel>().BetMoney)
                {
                    Tools.GobShowOnlyOne(Pages, "FollowSpeakBtns");
                    _prePageName = "FollowSpeakBtns";
                }
                else
                {
                    Tools.GobShowOnlyOne(Pages, "BetSpeakBtns");
                    _prePageName = "BetSpeakBtns";
                }
                break;

            default:
                ShowNothing();
                break;
            }
        }
Beispiel #11
0
        /// <summary>
        /// 显示指定玩家说话
        /// </summary>
        /// <param name="speaker"></param>
        /// <param name="cd"></param>
        /// <param name="rt"></param>
        public void Speaker(int speaker, float cd = -1, GameRequestType rt = GameRequestType.None)
        {
            var gdata        = App.GameData;
            var speakerPanel = gdata.GetPlayer <DuifenPlayerPanel>(speaker, true);

            if (speakerPanel.Info == null)
            {
                YxDebug.Log("座位上没有玩家!");
                return;
            }
            speakerPanel.BeginCountDown(cd <= 0 ? App.GetGameData <DuifenGlobalData>().SpeakCd : cd);

            if (speaker == gdata.SelfSeat)
            {
                _sendSpaceTimer = double.MinValue;
                SpeakMgr.ShowSpeak(rt);
            }
        }
Beispiel #12
0
        /// <summary>
        /// 发送交互信息
        /// </summary>
        /// <param name="rt">游戏状态</param>
        /// <param name="data">下注金额键值对,key为gold</param>
        public void SendRequest(GameRequestType rt, IDictionary data)
        {
            YxDebug.Log("!!SendRequest == " + rt);

            SFSObject sfsObject = new SFSObject();

            switch (rt)
            {
            case GameRequestType.Bet:
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("seat", (int)data["seat"]);
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.Fold:
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.KaiPai:
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("seat", (int)data["seat"]);
                sfsObject.PutInt("type", (int)GameRequestType.Bet);
                sfsObject.PutBool("kaipai", true);
                break;

            case GameRequestType.QiLi:
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("seat", (int)data["seat"]);
                sfsObject.PutInt("type", (int)GameRequestType.Bet);
                break;

            case GameRequestType.CouldStart:
                sfsObject.PutInt("type", (int)GameRequestType.CouldStart);
                break;

            case GameRequestType.SystemAuto:
                sfsObject.PutInt("type", (int)GameRequestType.SystemAuto);
                break;
            }
            YxDebug.Log("发送数据:");
            YxDebug.TraceSfsObject(sfsObject);

            SendGameRequest(sfsObject);
        }
Beispiel #13
0
        public virtual void Speak(GameRequestType rt, int betgold = 0)
        {
            switch (rt)
            {
            case GameRequestType.Fold:
                if (CardPoint != null)
                {
                    CardPoint.SetCardPointActive(false);
                }
                ReadyState = false;
                PlayerType = 3;
                Color color = new Color(200 / 255f, 200 / 255f, 200 / 255f, 1);
                SetFoldCardColor(color);
                break;
            }

            PlayTypeSound(rt, betgold);
            ShowGameType(rt);
        }
Beispiel #14
0
        /// <summary>
        /// 发送交互信息
        /// </summary>
        /// <param name="rt">游戏状态</param>
        /// <param name="data">下注金额键值对,key为gold</param>
        public void SendRequest(GameRequestType rt, IDictionary data = null)
        {
            YxDebug.Log("!!SendRequest == " + rt);
            var gdata = App.GameData;

            if (!App.GetGameData <BlackJackGameData>().IsGameInfo)
            {
                YxDebug.LogError("GameInfo还没有初始化!!");
                return;
            }
            SFSObject sfsObject = new SFSObject();

            //sfsObject
            switch (rt)
            {
            case GameRequestType.ApplyBanker:
            case GameRequestType.ApplyQuit:

                sfsObject.PutInt("type", (int)rt);
                sfsObject.PutInt("seat", gdata.SelfSeat);
                break;

            case GameRequestType.Ante:

                sfsObject.PutInt("gold", data == null ? 0 : (int)data["gold"]);
                sfsObject.PutInt("type", (int)rt);

                break;

            case GameRequestType.Insurance:
            case GameRequestType.Stand:
            case GameRequestType.AddRate:
            case GameRequestType.Hit:
                sfsObject.PutInt("type", (int)rt);
                break;
                #endregion
            }

            YxDebug.Log("发送数据:");
            YxDebug.TraceSfsObject(sfsObject);

            SendGameRequest(sfsObject);
        }
Beispiel #15
0
        /// <summary>
        /// 开始计时
        /// </summary>
        /// <param name="time">记录时间</param>
        /// <param name="type">时间类型</param>
        public void BeginCountDown(int time, GameRequestType type = GameRequestType.None)
        {
            if (time <= 0)
            {
                return;
            }
            gameObject.SetActive(time > 0);
            _timer = time;
            _bgSprite.spriteName = GetSprName(type);

            if (_isCounting)
            {
                return;
            }
            //开始计时
            _isCounting = true;
            _timeLabel.gameObject.SetActive(true);
            StartCoroutine(DoCd());
        }
Beispiel #16
0
        /// <summary>
        /// 通过名字显示玩家状态
        /// </summary>
        /// <param name="type"></param>
        /// <param name="betgold"></param>
        public override void PlayTypeSound(GameRequestType type, int betgold = 0)
        {
            switch (type)
            {
            case GameRequestType.BetSpeak:

                if (BetGoldSound.Contains(betgold))
                {
                    PlaySound(betgold + "f");
                }
                else
                {
                    PlaySound("BetSpeak");
                }
                break;

            case GameRequestType.Bet:
                break;

            case GameRequestType.Fold:
                PlaySound("Fold_" + Random.Range(1, 4));      //三个声音随机一个
                break;

            case GameRequestType.FollowSpeak:
                PlaySound("Follow_" + Random.Range(1, 3));           //两个声音随机
                break;

            case GameRequestType.KickSpeak:
                PlaySound("KickSpeak_" + Random.Range(1, 3));        //两个声音随机
                break;

            case GameRequestType.NotKick:
                //PlaySound("NotKick_" + Random.Range(1, 4));      //三个声音随机
                break;

            case GameRequestType.BackKick:

                PlaySound("BackKick_" + Random.Range(1, 3));         //两个声音随机
                break;
            }
        }
Beispiel #17
0
        /// <summary>
        /// 显示指定玩家说话
        /// </summary>
        /// <param name="speaker"></param>
        /// <param name="cd"></param>
        /// <param name="rt"></param>
        public void Speaker(int speaker, float cd = -1, GameRequestType rt = GameRequestType.None)
        {
            var gdata = App.GetGameData <FillpitGameData>();

            if (gdata.GetPlayerInfo(speaker, true) == null)
            {
                YxDebug.Log("座位上没有玩家!");
                return;
            }

            //设置等待
            bool loop = cd > 300;

            cd = loop ? 35 : cd <= 0 ? gdata.SpeakCd : cd;
            YxClockManager.BeginWaitPlayer(speaker, cd, isLoop: loop);

            if (speaker == gdata.SelfSeat)
            {
                SpeakMgr.ShowSpeak(rt);
            }
        }
Beispiel #18
0
        /// <summary>
        /// 发送交互信息
        /// </summary>
        /// <param name="rt"></param>
        /// <param name="data"></param>
        public void SendRequest(GameRequestType rt, IDictionary data)
        {
            YxDebug.Log("SendRequest == " + rt);

            if (!HasGetGameInfo)
            {
                YxDebug.LogError("GameInfo还没有初始化!!");
                return;
            }

            var sfsObject = new SFSObject();

            switch (rt)
            {
            case GameRequestType.Bet:
            {
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("type", (int)rt);
            }
            break;

            case GameRequestType.Fold:
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.SetGold:
            {
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("type", (int)rt);
            }
            break;
            }

            YxDebug.Log("发送数据:");
            YxDebug.TraceSfsObject(sfsObject);

            SendGameRequest(sfsObject);
        }
Beispiel #19
0
        /// <summary>
        /// 显示说话界面
        /// </summary>
        public virtual void ShowSpeak(GameRequestType rt)
        {
            YxDebug.Log("ShowSpeak rt === " + rt);
            if (rt == GameRequestType.None)
            {
                return;
            }

            switch (rt)
            {
            case GameRequestType.SendCard:

                Tools.GobShowOnlyOne(Pages, "ZuPaiBtns");
                break;

            case GameRequestType.BeginBet:
                if (App.GetGameData <PaiJiuGameData>().BankerSeat != App.GameData.SelfSeat)
                {
                    Tools.GobShowOnlyOne(Pages, "AddBetBtns");
                }
                break;
            }
        }
Beispiel #20
0
        /// <summary>
        /// 发送交互信息
        /// </summary>
        /// <param name="rt">游戏状态</param>
        /// <param name="data">下注金额键值对,key为gold</param>
        public void SendRequest(GameRequestType rt, IDictionary data)
        {
            YxDebug.Log("!!SendRequest == " + rt);

            if (!HasGetGameInfo)
            {
                YxDebug.LogError("GameInfo还没有初始化!!");
                return;
            }
            SFSObject sfsObject = new SFSObject();

            //var selfPlayer = App.GetGameData<FillpitGameData>().GetPlayer<PlayerPanel>();

            //sfsObject
            switch (rt)
            {
            case GameRequestType.BetSpeak:
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.Bet:
                sfsObject.PutInt("gold", (int)data["gold"]);
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.Card:
                break;

            case GameRequestType.Fold:
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.FollowSpeak:
                sfsObject.PutInt("gold", (int)data["gold"]);
                break;

            case GameRequestType.KickSpeak:
                sfsObject.PutInt("gold", (int)data["gold"]);
                break;

            case GameRequestType.NotKick:
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.BackKick:
                sfsObject.PutInt("gold", (int)data["gold"]);
                break;

            case GameRequestType.StartGame:
                sfsObject.PutInt("type", (int)rt);
                break;

            case GameRequestType.WatchCard:
                sfsObject.PutInt("type", (int)rt);
                break;
            }

            //SmartManager.SmartFox.Send(new ExtensionRequest(GlobalData.GameKey + RequestCmd.Request, sfsObject));

            YxDebug.Log("发送数据:");
            YxDebug.TraceSfsObject(sfsObject);

            SendGameRequest(sfsObject);
        }
Beispiel #21
0
        public override void GameResponseStatus(int type, ISFSObject response)
        {
            if (!App.GetRServer <FillpitGameServer>().HasGetGameInfo)
            {
                return;
            }
            GameRequestType gameType = (GameRequestType)type;

            base.GameResponseStatus(type, response);
            var gdata = App.GameData;

            switch (gameType)
            {
            case GameRequestType.Card:
                //搓牌
                if (response.ContainsKey("isRub"))
                {
                    IsRub = response.GetBool("isRub");
                    if (!IsRub || PubCardScript == null)
                    {
                        break;
                    }

                    int[] cardSeats = response.GetIntArray("seats");

                    if (response.ContainsKey("selfCard") && response.GetIntArray("selfCard").Length >= 0)
                    {
                        var cardValList = new List <int>();
                        AddCards(cardValList, response.GetIntArray("selfCard"));
                        if (response.ContainsKey("cardsArr"))
                        {
                            ISFSArray cardArray = response.GetSFSArray("cardsArr");
                            int       count     = cardArray.Count;
                            for (int i = 0; i < count; i++)
                            {
                                int[] cards = cardArray.GetIntArray(i);
                                AddCards(cardValList, GetSelfCard(cards, cardSeats));
                            }
                        }
                        else
                        {
                            int[] cards = response.GetIntArray("cards");
                            AddCards(cardValList, GetSelfCard(cards, cardSeats));
                        }
                        PubCardScript.ShowView(cardValList.ToArray());
                    }
                    SetPlayersRunMarkActive(cardSeats, true);
                }
                break;

            case GameRequestType.BetSpeak:
                if (PubCardScript != null)
                {
                    PubCardScript.PlayHide();
                }
                SetAllPlayerRubMarkActive(false);
                break;

            case GameRequestType.RubDone:
                int seat = response.GetInt("seat");
                gdata.GetPlayer <PlayerPanel>(seat, true).SetRubMark(false);
                if (seat == gdata.SelfSeat)
                {
                    if (PubCardScript != null)
                    {
                        PubCardScript.PlayHide();
                    }
                }
                break;
            }
        }
Beispiel #22
0
 public void ShowGameType(GameRequestType type)
 {
     PanelPlayerType.ShowGameType(type);
 }
Beispiel #23
0
        public string GetLabeText(GameRequestType type)
        {
            int index = TextLabelKey.FindIndex(a => a.Equals(type.ToString()));

            return(TextLabelVal[index]);
        }
Beispiel #24
0
        public override void GameResponseStatus(int type, ISFSObject response)
        {
            YxDebug.Log("Request == " + (GameRequestType)type);
            var gdata = App.GetGameData <FillpitGameData>();

            if (response.ContainsKey("anteRate"))
            {
                YxDebug.Log("===============================");
                YxDebug.LogArray(response.GetIntArray("anteRate"));
                BetMgr.SetAddBtns(response.GetIntArray("anteRate"));
            }

            if (!App.GetRServer <FillpitGameServer>().HasGetGameInfo)
            {
                return;
            }

            GameRequestType gameType = (GameRequestType)type;
            int             selfSeat = gdata.SelfSeat;

            switch (gameType)
            {
            case GameRequestType.Bet:

                //当存在users时,说明下盲注,这个名游戏已经开始
                if (response.ContainsKey("users"))
                {
                    OnBetBlinds(response);
                    //投盲注,如果烂底,盲注值为0
                    gdata.IsLanDi = response.ContainsKey("landi") && response.GetBool("landi");
                }

                if (response.ContainsKey("banker"))
                {
                    var banker   = response.GetInt("banker");
                    var betPanel = GetPlayerPanel(banker, true);
                    betPanel.SetBankIcon(true);
                }

                //此为某个玩家下注
                if (response.ContainsKey("seat"))
                {
                    int betGold = response.GetInt("gold");
                    int betseat = response.GetInt("seat");

                    gdata.LastBetValue = betGold;

                    var betPanel = GetPlayerPanel(betseat, true);
                    betPanel.PlayerBet(betGold, true, 200);
                    betPanel.ShowGameType(gameType);
                    if (response.ContainsKey("speakerType"))
                    {
                        betPanel.Speak((GameRequestType)response.GetInt("speakerType"), betGold);
                    }

                    LaddyMgr.OnPlayerBet(betGold);

                    if (betseat == selfSeat)
                    {
                        SpeakMgr.ShowNothing();
                    }
                }


                break;

            case GameRequestType.BetSpeak:
                int bseat = response.GetInt("seat");       //当前座位号
                Speaker(bseat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f, GameRequestType.BetSpeak);
                break;

            case GameRequestType.Card:

                HideAllPalyerGameType(false);

                int[] cardSeats = response.GetIntArray("seats");
                DealerMgr.FirstSeat = response.GetInt("fs");

                int curCard = response.GetInt("curCardRound");
                LaddyMgr.OnDealCard(curCard);

                //新游戏开始,第一轮发牌带上隐藏牌
                if (curCard == 1)
                {
                    var count = DealerMgr.HideN;
                    for (int i = 0; i < count; i++)
                    {
                        int[] pokers = new int[cardSeats.Length];
                        DealerMgr.BeginBigDeal(pokers, cardSeats);
                    }
                }

                //如果存在私人牌,则将牌赋值到对应手牌处
                if (response.ContainsKey("selfCard") && response.GetIntArray("selfCard").Length >= 0)
                {
                    int[] selfCards = response.GetIntArray("selfCard");
                    YxDebug.LogArray(selfCards);
                    GetPlayerPanel().UserBetPoker.SetHandPokersValue(selfCards);
                }

                //将每个玩家明牌点数显示出来
                if (response.ContainsKey("openCV"))
                {
                    int seatCount          = cardSeats.Length;
                    var openCardValueArray = response.GetIntArray("openCV");
                    int openMax            = -1;
                    foreach (var openVal in openCardValueArray)
                    {
                        if (openMax < openVal)
                        {
                            openMax = openVal;
                        }
                    }
                    int arrayLength = openCardValueArray.Length;
                    for (int i = 0; i < arrayLength; i++)
                    {
                        int cvSeat  = cardSeats[i % seatCount];
                        int openVal = openCardValueArray[i];
                        var panel   = GetPlayerPanel(cvSeat, true);
                        panel.SetShownCardsPoint(openVal);
                        panel.SetMaxPoint(openMax);
                        panel.ShowPointLabel();
                    }
                }

                if (response.ContainsKey("selfCV"))
                {
                    gdata.GetPlayer <PlayerPanel>().SetAllCardPoint(response.GetInt("selfCV"));
                }

                //是否有公共牌,如果有,说明牌数少于在座人数
                //公共牌用于发给其余多的人
                if (response.ContainsKey("publicCard"))
                {
                    DealerMgr.PublicCardId = response.GetInt("publicCard");
                }

                if (response.ContainsKey("cardsArr"))
                {
                    ISFSArray cardsArray = response.GetSFSArray("cardsArr");
                    int       arraycount = cardsArray.Count;
                    for (int i = 0; i < arraycount; i++)
                    {
                        DealerMgr.BeginBigDeal(cardsArray.GetIntArray(i), cardSeats);
                    }
                }
                else
                {
                    DealerMgr.BeginBigDeal(response.GetIntArray("cards"), cardSeats);       //当有selfCard时,要将发牌重置到从第0张发
                }

                HideAllPalyerGameType(false);
                gdata.LastBetValue = 0;          //将最后一次下注重置,避免下次跟注时出现问题
                break;

            case GameRequestType.Fold:
                int foldSeat = response.GetInt("seat");
                YxClockManager.StopWaitPlayer();
                var foldPanel = GetPlayerPanel(foldSeat, true);
                foldPanel.Speak(GameRequestType.Fold);

                if (foldSeat == selfSeat)
                {
                    SpeakMgr.ShowNothing();
                }
                YxDebug.Log("玩家 " + foldSeat + " 弃牌!!");
                break;

            case GameRequestType.FollowSpeak:       //  跟注
                int followSeat = response.GetInt("seat");

                Speaker(followSeat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f, gdata.LastBetValue > 0
                                ? GameRequestType.FollowSpeak
                                : GameRequestType.BetSpeak);
                var followPanel = GetPlayerPanel(followSeat, true);
                followPanel.HideGameType();
                break;


            case GameRequestType.KickSpeak:
                int kickSeat = response.GetInt("seat");
                Speaker(kickSeat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f,
                        GameRequestType.KickSpeak);
                break;

            case GameRequestType.NotKick:

                int notKickSeat = response.GetInt("seat");
                YxClockManager.StopWaitPlayer();
                var notkickspeaker = gdata.GetPlayer <PlayerPanel>(notKickSeat, true);
                notkickspeaker.Speak(GameRequestType.NotKick);

                if (notKickSeat == selfSeat)
                {
                    SpeakMgr.ShowNothing();
                }
                break;

            case GameRequestType.Result:
                DealerMgr.FastDeal();          //把堆积的牌全部发出去
                gdata.IsGameing = false;
                if (response.ContainsKey("result"))
                {
                    YxClockManager.StopWaitPlayer();
                    bool isLandi = response.ContainsKey("landi") && response.GetBool("landi");
                    gdata.IsLanDi = isLandi;
                    AnimationMgr.SetResultLanDiAnim(isLandi);

                    HideAllPalyerGameType(true);

                    ISFSArray resultArray = response.GetSFSArray("result");
                    ShowPlayerCardsPoint(resultArray);
                    //是否是烂底
                    //如果烂底,直接显示结算结果,否则显示胜利动画
                    if (!isLandi)
                    {
                        ShowWinAnim(resultArray);
                    }
                    else
                    {
                        LaddyMgr.DeductHappys();
                    }
                    SummaryMgr.OnGameResult(resultArray);


                    //初始化玩家游戏币
                    foreach (ISFSObject resultItem in resultArray)
                    {
                        int resultSeat  = resultItem.GetInt("seat");
                        var resultPanel = GetPlayerPanel(resultSeat, true);
                        resultPanel.OnGameResult(resultItem);
                    }
                }

                break;


            case GameRequestType.BackKick:

                int backKickSeat = response.GetInt("seat");

                Speaker(backKickSeat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f,
                        GameRequestType.BackKick);
                break;

            case GameRequestType.StartGame:
                //开始游戏,服务器标记本房间已经开始游戏,所以本机必须发送ready
                //为防止本机出现显示数据异常,以服务器信息为准
                if (response.ContainsKey("isStart") && response.GetBool("isStart"))
                {
                    App.GetRServer <FillpitGameServer>().ReadyGame();
                    WeiChatInvite.SetWeiChatBtnActive(false);
                }
                break;
            }
        }