Beispiel #1
0
        public override void GameResponseStatus(int type, ISFSObject response)
        {
            var gdata = App.GetGameData <BrnnGameData>();

            switch (type)
            {
            case RequestType.BeginBet:
                Reset();
                WaitView.Hide();
                base.GameResponseStatus(type, response);
                if (response.ContainsKey("bankRound"))
                {
                    gdata.CurrentBanker.SetBankerTime(response.GetInt("bankRound"));
                }
                else
                {
                    gdata.CurrentBanker.HideBankerTime();
                }
                YxMessageTip.Show("开始下注");
                break;

            case RequestType.EndBet:
                WaitView.Hide();
                base.GameResponseStatus(type, response);
                YxMessageTip.Show("停止下注");

                break;

            case RequestType.Result:
                WaitView.Hide();
                gdata.SetGameStatus(YxEGameStatus.Normal);
                CardsCtrl.ReceiveResult(response);
                ResultBet(CardsCtrl.Bpg, ShowNumCtrl.ZBet);
                StartCoroutine(ResultMoveChip());

                if (ResultWin != null)
                {
                    if (!isCounting)
                    {
                        StartCoroutine(ShowResultView(response));
                    }
                }

                TableResultInfo.ShowTableResultInfo(response);

                UserListCtrl.RefreshBanker(response);
                RefreshSelf(response);
                gdata.GetPlayer <BrnnPlayer>().ReSet();
                ApplyCtrl.HideApplyBanker();
                ProgressCtrl.SetNum(response);

                break;

            default:
                base.GameResponseStatus(type, response);
                break;
            }
        }
Beispiel #2
0
        public override void GameResponseStatus(int type, ISFSObject response)
        {
            var gdata = App.GetGameData <BrnnGameData>();

            switch (type)
            {
            case RequestType.Bet:
                BetCtrl.Bet(response);
                ProgressCtrl.RefreshNum(response);
                ShowNumCtrl.RefreshNum(response);
                if (response.GetInt("seat") == gdata.SelfSeat)
                {
                    if (gdata.GetPlayerInfo().CoinA < gdata.MiniApplyBanker)
                    {
                        ApplyCtrl.Instance.SetStutus(2);
                    }
                }
                break;

            case RequestType.BeginBet:
                gdata.SetGameStatus(YxEGameStatus.Play);
                gdata.BeginBet = true;
                CardsCtrl.ReSetPonits();
                CardsCtrl.ReSetGiveCardsStatus();
                ShowNumCtrl.Reset();
                ReSetGame();
                BetCtrl.Reset();

                ProgressCtrl.ReSetCountdown(16);
                ProgressCtrl.BeginCountdown();
                ApplyCtrl.RefreshBanker();
                break;

            default:
                base.GameResponseStatus(type, response);
                return;
            }
            OnGetPlayers(response);
        }
Beispiel #3
0
        public override void GameResponseStatus(int type, ISFSObject response)
        {
            var gdata = App.GetGameData <BtwGameData>();

            switch ((BtwSkin02RequestType)type)
            {
            case BtwSkin02RequestType.XiaZhu:
                YxDebug.Log("-----------------下注--------------");
                WaitWin.Hide();
                BetCtrl.Bet(response);
                ShowNumCtrl.RefreshNum(response);
                break;

            case BtwSkin02RequestType.ZhuangChange:
                YxDebug.Log("-----------------获取上庄列表--------------");
                WaitWin.Hide();
                UserListCtrl.RefreshBanker(response);
                ProgressCtrl.SetNum(response);
                BetCtrl.ShowChip();
                break;

            case BtwSkin02RequestType.Start:
                YxDebug.Log("-----------------开始下注--------------");
                WaitWin.Hide();
                gdata.BeginBet = true;
                CardsCtrl.ReSetPonits();
                CardsCtrl.gameObject.SetActive(false);
                ShowNumCtrl.Reset();
                ReSetGame();
                BetCtrl.ShowChip();
                ProgressCtrl.ReSetCountdown(18);
                ProgressCtrl.BeginCountdown();
                ApplyCtrl.RefreshBanker();
                TimeBet.gameObject.SetActive(true);
                if (gdata.BankerPlayer.Info.Seat != -1)
                {
                    gdata.BankerPlayer.AddBankerTime();
                }
                Facade.Instance <MusicManager>().Play("beginbet");
                YxMessageTip.Show("开始下注");
                break;

            case BtwSkin02RequestType.Stop:
                YxDebug.Log("-----------------停止下注--------------");
                gdata.BeginBet = false;
                BetCtrl.HideChip();
                ProgressCtrl.EndCountdown();
                TimeBet.gameObject.SetActive(false);
                Facade.Instance <MusicManager>().Play("stopbet");
                WaitWin.Hide();
                break;

            case BtwSkin02RequestType.RollResult:
                YxDebug.Log("-----------------发牌--------------");
                CardsCtrl.BeginGiveCards(response);
                CardsCtrl.gameObject.SetActive(true);
                WaitWin.Hide();
                break;

            case BtwSkin02RequestType.GameResult:
                YxDebug.Log("-----------------结算--------------");
                WaitWin.Hide();
                gdata.SetGameStatus(YxEGameStatus.Normal);
                CardsCtrl.ReceiveResult(response);
                ResultBet(CardsCtrl.Bpg, ShowNumCtrl.ZBet);
                StartCoroutine(ResultMoveChip());
                if (ResultWin != null)
                {
                    StartCoroutine(ShowResultView(response));
                }
                RefreshSelf(response);
                ProgressCtrl.SetNumOnResult(response);
                break;

            case BtwSkin02RequestType.GroupBet:
                YxDebug.Log("-----------------流式下注--------------");
                BetCtrl.GroupBet(response);
                ProgressCtrl.GroupRefreshNum(response);
                ShowNumCtrl.GroupRefreshNum(response);
                break;

            default:
                YxDebug.Log("-*-*-Wrong RequestType : " + type);
                break;
            }
        }