/// <summary> /// 服务器广播开局 /// </summary> /// <param name="obj"></param> private void OnServerBroadcastSendPoker(byte[] obj) { JY_ROOM_BEGIN proto = JY_ROOM_BEGIN.decode(obj); RoomJuYouProxy.Instance.SendPoker(proto); if (JuYouSceneCtrl.Instance != null) { JuYouSceneCtrl.Instance.DealPoker(proto.seat.pos, true); } }
/// <summary> /// 发牌 /// </summary> /// <param name="proto"></param> public void SendPoker(JY_ROOM_BEGIN proto) { if (proto.hasSeat() && proto.seat.hasPos()) { SeatEntity seat = GetSeatBySeatId(proto.seat.pos); for (int i = 0; i < proto.seat.pokerListCount(); i++) { seat.PokerList.Add(new Poker()); } seat.SetSeat(proto.seat); SendSeatInfoChangeNotify(seat); //Debug.Log("proto.hasUnixtime() && seat.PokerList.Count==2" + (proto.hasUnixtime() && seat.PokerList.Count == 2)); SetCountDown((proto.hasUnixtime() && seat.PokerList.Count == 2) ? proto.unixtime:0); } }