Ejemplo n.º 1
0
    //切牌
    #region OnServerCutPoker 服务器广播切牌
    /// <summary>
    /// 服务器广播切牌
    /// </summary>
    /// <param name="obj"></param>
    private void OnServerCutPoker(byte[] obj)
    {
        PAIGOW_ROOM_CUTPOKER proto = PAIGOW_ROOM_CUTPOKER.decode(obj);

        RoomPaiJiuProxy.Instance.OnServerCutPoker(proto);

        if (proto.hasPos() && proto.hasCutPokerIndex())
        {
            Debug.Log("============================================开始切牌=======================================");
            if (PaiJiuSceneCtrl.Instance != null)
            {
                PaiJiuSceneCtrl.Instance.CutPoker(proto.cutPokerIndex);
            }
        }
    }
Ejemplo n.º 2
0
    public void OnServerCutPoker(PAIGOW_ROOM_CUTPOKER proto)
    {
        if (proto.hasPos())
        {
            Seat seat = GetSeatBySeatId(proto.pos);

            if (proto.hasIsCutPoker())
            {
                Debug.Log("某玩家确认是否切牌 pos:" + seat.Pos);
                //某玩家确认是否切牌
                seat.isCutPoker = (Seat.CutPoker)proto.isCutPoker;
            }
            else
            {
                Debug.Log("服务器询问是否需要切牌 pos:" + seat.Pos);

                for (int i = 0; i < CurrentRoom.SeatList.Count; i++)
                {
                    CurrentRoom.SeatList[i].isCutPoker = Seat.CutPoker.None;
                }

                CurrentRoom.roomStatus = ROOM_STATUS.CUTPOKER;
                //询问是否需要切牌
                seat.isCutPoker = Seat.CutPoker.IsNotOperating;
            }

            if (proto.hasCutPokerIndex())
            {
                Debug.Log("某玩家操作切牌信息 pos:" + seat.Pos);
                //某玩家操作切牌信息
                seat.isCutPoker = Seat.CutPoker.IsCut;
            }

            SendSeatInfoChangeNotify(seat);
        }
    }