Пример #1
0
    /// <summary>
    /// 服务器广播换庄
    /// </summary>
    private void OnServerChangeBanker(byte[] obj)
    {
        AppDebug.Log("服务器广播换庄");
        PAIGOW_ROOM_CHANGEBANKER proto = PAIGOW_ROOM_CHANGEBANKER.decode(obj);

        RoomPaiJiuProxy.Instance.OnServerChangeBanker(proto);
    }
Пример #2
0
    public void OnServerChangeBanker(PAIGOW_ROOM_CHANGEBANKER proto)
    {
        CurrentRoom.roomStatus = ROOM_STATUS.READY;
        if (proto.hasPos())
        {
            Seat seat = GetSeatBySeatId(proto.pos);
            if (seat != null)
            {
                for (int i = 0; i < CurrentRoom.SeatList.Count; i++)
                {
                    CurrentRoom.SeatList[i].IsBanker = false;
                }
                seat.IsBanker = true;
                BankerSeat    = seat;

                for (int i = 0; i < CurrentRoom.SeatList.Count; i++)
                {
                    //显示庄
                    TransferData data = new TransferData();
                    data.SetValue("seat", CurrentRoom.SeatList[i]);
                    ModelDispatcher.Instance.Dispatch(ConstDefine_PaiJiu.ObKey_SetBankerAni, data);
                }
            }
        }

        SendRoomInfoChangeNotify();
    }