public void OpenAPoker(NN_ROOM_DRAW proto) { if (proto.hasPos()) { NiuNiu.Seat seat = GetSeatBySeatPos(proto.pos); if (seat == null) { return; } List <NN_POKER> prPokerList = proto.getNnPokerList(); //便利应该开的牌 for (int i = 0; i < prPokerList.Count; i++) { //找到对应牌 for (int k = 0; k < seat.PokerList.Count; k++) { if (prPokerList[i].index > 0 && prPokerList[i].index == seat.PokerList[k].index) { seat.PokerList[k].SetPoker(prPokerList[i]); seat.PokerList[k].status = NN_ENUM_POKER_STATUS.POKER_STATUS_UPWARD; } } } SendSeatInfoChangeNotify(seat); //UI翻牌 //显示这些牌 TransferData data = new TransferData(); data.SetValue <NiuNiu.Seat>("Seat", seat); SendNotification(ConstDefine_NiuNiu.ObKey_SetShowPokersUI, data); //设置某玩家手牌 } }
/// <summary> /// 服务器广播某玩家打开某些牌 /// </summary> /// <param name="obj"></param> public void OpenAPoker(byte[] obj) { NN_ROOM_DRAW proto = NN_ROOM_DRAW.decode(obj); RoomNiuNiuProxy.Instance.OpenAPoker(proto); if (proto.hasPos() && proto.pos == RoomNiuNiuProxy.Instance.PlayerSeat.Pos) { NiuNiuGameCtrl.Instance.UIRubPokerViewClose(); } }