public void AutoBanker(byte[] obj) { NN_ROOM_HOG_SUCCEED proto = NN_ROOM_HOG_SUCCEED.decode(obj); RoomNiuNiuProxy.Instance.RobBankerWin(proto, false); Debug.Log("没牛下庄结果 pos: " + proto.pos); }
public void RobBankerWin(byte[] obj) { //RoomNiuNiuProxy.Instance.CurrentRoom.roomStatus = NN_ENUM_ROOM_STATUS.IDLE; NN_ROOM_HOG_SUCCEED proto = NN_ROOM_HOG_SUCCEED.decode(obj); RoomNiuNiuProxy.Instance.RobBankerWin(proto); Debug.Log("抢庄结果 pos: " + proto.pos); }
public void RobBankerWin(NN_ROOM_HOG_SUCCEED proto, bool isDelay = false) { if (proto.hasPos()) { if (CurrentRoom.roomModel == Room.RoomModel.robBanker && CurrentRoom.roomStatus == NN_ENUM_ROOM_STATUS.HOG) { //设置抢庄动画 TransferData data = new TransferData(); data.SetValue("CurrentRoom", CurrentRoom); data.SetValue("isOnOff", true); SendNotification(ConstDefine_NiuNiu.ObKey_SetRobBankerAni, data); } if (CurrentRoom.roomModel == Room.RoomModel.AbdicateBanker) { CurrentRoom.roomStatus = NN_ENUM_ROOM_STATUS.IDLE; } for (int i = 0; i < CurrentRoom.SeatList.Count; i++) { CurrentRoom.SeatList[i].IsBanker = false; if (CurrentRoom.roomModel != Room.RoomModel.robBanker) { CurrentRoom.SeatList[i].isAlreadyHOG = -1; } } NiuNiu.Seat seat = GetSeatBySeatPos(proto.pos); if (seat == null) { for (int i = 0; i < CurrentRoom.SeatList.Count; i++) { if (CurrentRoom.SeatList[i].PlayerId > 0) { seat = CurrentRoom.SeatList[i]; } } } seat.IsBanker = true; seat.IsReady = true; BankerSeat = seat; CurrentRoom.RobBankerSeat = null; SendRoomInfoChangeNotify(); } }