/// <summary> /// 服务器广播发牌 /// </summary> /// <param name="obj"></param> public void Deal(byte[] obj) { Debug.Log("服务器广播发牌"); NN_ROOM_BEGIN proto = NN_ROOM_BEGIN.decode(obj); RoomNiuNiuProxy.Instance.Deal(proto); }
public void Deal(NN_ROOM_BEGIN proto) { if (CurrentRoom.superModel == Room.SuperModel.PassionRoom) { CurrentRoom.currentLoop++; } CurrentRoom.roomStatus = CurrentRoom.superModel == Room.SuperModel.CommonRoom ? NN_ENUM_ROOM_STATUS.LOOKPOCKER : NN_ENUM_ROOM_STATUS.DEAL; if (proto.hasUnixtime()) { CurrentRoom.serverTime = proto.unixtime; SetCountDown(); } List <NN_SEAT> ptSeatLiat = proto.getNnSeatList(); Debug.Log("拍数据"); for (int i = 0; i < ptSeatLiat.Count; i++) { NiuNiu.Seat seat = GetSeatBySeatPos(ptSeatLiat[i].pos); if (seat != null) { //牌数据 for (int j = 0; j < ptSeatLiat[i].getNnPokerList().Count; j++) { Debug.Log("index" + ptSeatLiat[i].getNnPoker(j).index + "size" + ptSeatLiat[i].getNnPoker(j).size + "color" + ptSeatLiat[i].getNnPoker(j).color + "pokerStatus" + ptSeatLiat[i].getNnPoker(j).pokerStatus); seat.PokerList[j].SetPoker(ptSeatLiat[i].getNnPokerList()[j]); } //下注分 if (ptSeatLiat[i].hasPour()) { seat.Pour = ptSeatLiat[i].pour; } } } TransferData data = new TransferData(); data.SetValue <NiuNiu.Room>("Room", CurrentRoom); SendNotification(ConstDefine_NiuNiu.ObKey_SetDeal, data);//发牌显示 //房间变更 SendRoomInfoChangeNotify(); }