Exemplo n.º 1
0
    /// <summary>
    /// 开局发牌
    /// </summary>
    public void Begin(PDK_BEGIN proto)
    {
        ++CurrentRoom.currentLoop;

        //黑桃3的座位
        CurrentRoom.SpadesThreePos = proto.pos;

        List <SEAT_INFO> protoSeatList = proto.getSeatInfoList();

        for (int i = 0; i < protoSeatList.Count; ++i)
        {
            SeatEntity seat = GetSeatBySeatPos(protoSeatList[i].pos);
            if (seat == null)
            {
                continue;
            }
            Debug.Log(string.Format("Pos:{0}  Count:{1}", seat.Pos, protoSeatList[i].getPokerInfoList().Count));
            seat.HandPockerNum = protoSeatList[i].HandPocker;
            ResetSeat(seat);

            seat.Status = proto.pos == seat.Pos ? SeatEntity.SeatStatus.Operate : SeatEntity.SeatStatus.Wait;


            List <POKER_INFO> prPokerList = protoSeatList[i].getPokerInfoList();
            Debug.Log("发牌位置" + seat.Pos);
            //手牌
            for (int j = 0; j < prPokerList.Count; ++j)
            {
                Debug.Log(string.Format("index:{0} size:{1} color:{2}", prPokerList[j].index, prPokerList[j].size, prPokerList[j].color));

                seat.pokerList.Add(new Poker(prPokerList[j].index, prPokerList[j].size, prPokerList[j].color));
            }
            PaoDeKuaiHelper.Sort(seat.pokerList);
        }

        CurrentRoom.Status = RoomEntity.RoomStatus.Begin;


        SendRoomInfoChangeNotify();
    }
Exemplo n.º 2
0
 public BeginCommand(PDK_BEGIN data)
 {
     m_DataEntity = data;
 }