public override void GameResponseStatus(int type, ISFSObject response) { var gdata = App.GetGameData <BjlGameData>(); switch (type) { case RequestType.BeginBet: Reset(); if (App.GameKey.Equals("bjlb")) { BankerCtrl.SetApplyBankerBtnActive(true); } gdata.BeginBet = true; ((ProgressCtrl02)ProgressCtrl).PlayClock(response.ContainsKey("cd") ? response.GetInt("cd") : 12, RequestType.BeginBet, SetStopBet); //重新设置注的层 if (gdata.CurrentBanker != null) { var curBanekr = gdata.CurrentBanker; curBanekr.TotalCount++; curBanekr.UpdateView(); //限制自己为庄家时下注 if (gdata.BankSeat < 0) { var bankerInfo = new BjlUserInfo { NickM = "系统庄", Seat = -1, CoinA = long.MaxValue, TotalCount = 0, WinTotalCoin = 0 }; gdata.CurrentBanker.Info = bankerInfo; curBanekr.UpdateView(); } BankerCtrl.RefreshBanker(); if (gdata.SelfSeat != gdata.BankSeat) { BetCtrl.ShowChip(); } else { YxMessageBox.Show(new YxMessageBoxData { Msg = "您是本局的庄家!", Delayed = 2 }); } } else { BetCtrl.ShowChip(); } if (response.ContainsKey("bankRound")) { BankerTime.SetBankerTime(response.GetInt("bankRound")); } else { BankerTime.HideBankerTime(); } WaitWin.Hide(); Facade.Instance <MusicManager>().Play("BeginBet"); break; case RequestType.EndBet: base.GameResponseStatus(type, response); ProgressCtrl.StopClock(RequestType.EndBet); Facade.Instance <MusicManager>().Play("StopBet"); if (App.GameKey.Equals("bjlb")) { BankerCtrl.SetApplyBankerBtnActive(false); } break; case RequestType.Result: gdata.SetGameStatus(YxEGameStatus.Normal); gdata.IsGaming = false; var hisData = gdata.TrendConfig.HistoryData; int count = hisData.Count; if (count > 0) { int winIndex = GetMenIndex(hisData[count - 1]); var bpg = response.GetIntArray("bpg"); ResultBet(winIndex, bpg); StartCoroutine(ResultMoveChip(winIndex, bpg)); } ProgressCtrl.StopClock(RequestType.Result); UserListCtrl.RefreshBanker(response); RefreshSelf(response); TableResultInfo.ShowTableResultInfo(response); CardsCtrl02.SetCardCtrlActive(false); break; case RequestType.GiveCards: if (response.ContainsKey("cd")) { ((ProgressCtrl02)ProgressCtrl).PlayClock(response.ContainsKey("cd") ? response.GetInt("cd") : 12, RequestType.GiveCards); } else { ProgressCtrl.Hide(); } CardsCtrl02.BeginGiveCards(response); ShowNumCtrl.GroupRefreshNum(response); WaitWin.Hide(); break; default: base.GameResponseStatus(type, response); break; } }
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; } }