/// <summary> /// 换庄 /// </summary> /// <param name="proto"></param> public void OnServerChooseBanker(JY_ROOM_INFORMBANKER proto) { if (!proto.hasPos()) { return; } SeatEntity seat = GetSeatBySeatId(proto.pos); if (seat == null) { return; } //切换庄 for (int i = 0; i < CurrentRoom.SeatList.Count; i++) { if (CurrentRoom.SeatList[i] != null && CurrentRoom.SeatList[i].PlayerId > 0) { CurrentRoom.SeatList[i].IsBanker = false; } } seat.IsBanker = true; BankerSeat = seat; //UI刷新 SendRoomInfoChangeNotify(); }
/// <summary> /// 服务器广播换庄 /// </summary> private void OnServerChooseBanker(byte[] obj) { AppDebug.Log("服务器广播换庄"); JY_ROOM_INFORMBANKER proto = JY_ROOM_INFORMBANKER.decode(obj); RoomJuYouProxy.Instance.OnServerChooseBanker(proto); //if (PaiJiuSceneCtrl.Instance != null) //{ // PaiJiuSceneCtrl.Instance.ChooseBanker(); //} }