Ejemplo n.º 1
0
        /// <summary>
        /// 房间信息变更
        /// </summary>
        /// <param name="obj"></param>
        private void OnRoomInfoChanged(TransferData data)
        {
            RoomEntity room = data.GetValue <RoomEntity>("Room");

            //if (m_TextBaseScore.text.Contains("底"))
            //{
            //    m_TextBaseScore.SafeSetText("底    分:" + room.BaseScore.ToString());
            //}
            base.ShowLoop(room.currentLoop, room.maxLoop, room.isQuan);
            base.SetUI(room.roomId, room.BaseScore);
        }
Ejemplo n.º 2
0
 IEnumerator BeginTor(RoomEntity room,bool isPlayAnimation)
 {
     if (isPlayAnimation)
     {                
         for (int i = 0; i < room.SeatList.Count; i++)
         {
             if (room.SeatList[i].handPokerList == null || room.SeatList[i].handPokerList.Count == 0 ) continue;
             m_Seats[room.SeatList[i].Index].Begin(room.SeatList[i].handPokerList, isPlayAnimation);
             yield return null;
         }
     }
     else
     {
         for (int i = 0; i < room.SeatList.Count; i++)
         {
             if (room.SeatList[i].handPokerList.Count == 0) continue;
             m_Seats[room.SeatList[i].Index].Begin(room.SeatList[i].handPokerList, isPlayAnimation);                  
         }
     }           
 }
Ejemplo n.º 3
0
 public CreateRoomCommand(RoomEntity room)
 {
     m_Room = room;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 开局
 /// </summary>
 /// <param name="room"></param>
 public void Begin(RoomEntity room, bool isPlayAnimation)
 {
     m_UISceneShiSanZhangView.Begin(room, isPlayAnimation);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 开局
 /// </summary>
 public void Begin(RoomEntity room, bool isPlayAnimation)
 {
     StartCoroutine(BeginTor(room, isPlayAnimation));            
 }
Ejemplo n.º 6
0
        public const int ROOM_SEAT_COUNT = 4; //房间座位数量


        public void InitRoom(SSS_CREATE_ROOM proto)
        {
            //CurrentRoom = room;
            //CalculateSeatIndexOne();  //普通场计算座位 Index
            //SendRoomInfoChangeNotify();
            CurrentRoom = new RoomEntity()
            {
                roomId        = proto.roomInfo.roomId,
                currentLoop   = proto.roomInfo.loop,
                maxLoop       = proto.roomInfo.maxLoop,
                SszRoomStatus = proto.roomInfo.roomStatus,
                BaseScore     = proto.roomInfo.baseScore,//底分
                SeatCount     = proto.roomInfo.seatInfoCount(),
                gameId        = GameCtrl.Instance.CurrentGameId,
                groupId       = 0,
                matchId       = 0,
                SeatList      = new List <SeatEntity>(),
            };
            Debug.Log(proto.roomInfo.seatInfoCount() + "              座位长度");
            for (int i = 0; i < proto.roomInfo.seatInfoCount(); ++i)
            {
                SEAT_INFO  ssz_seat = proto.roomInfo.getSeatInfo(i);
                SeatEntity seat     = new SeatEntity();

                seat.PlayerId = ssz_seat.playerId;//玩家ID
                if (seat.PlayerId == AccountProxy.Instance.CurrentAccountEntity.passportId)
                {
                    seat.IsPlayer = true;
                }
                Debug.Log(ssz_seat.nickname + "              玩家名字");
                seat.Nickname        = ssz_seat.nickname;   //玩家名字
                seat.Avatar          = ssz_seat.avatar;     //玩家头像
                seat.Gender          = ssz_seat.gender;     //玩家性别
                seat.Gold            = ssz_seat.gold;       //底分
                seat.Pos             = ssz_seat.pos;        //座位位置
                seat.seatStatus      = ssz_seat.seatStatus; //座位状态
                seat.handPokerList   = new List <Poker>();
                seat.firstPokerList  = new List <Poker>();
                seat.middlePokerList = new List <Poker>();
                seat.endPokerList    = new List <Poker>();
                for (int j = 0; j < ssz_seat.firstPokerInfoCount(); ++j)
                {
                    FIRST_POKER_INFO firstPoker = ssz_seat.getFirstPokerInfo(j);
                    seat.firstPokerList.Add(new Poker(firstPoker.index, firstPoker.color, firstPoker.size));
                }
                for (int j = 0; j < ssz_seat.secondPokerInfoCount(); ++j)
                {
                    SECOND_POKER_INFO middlePoker = ssz_seat.getSecondPokerInfo(j);
                    seat.middlePokerList.Add(new Poker(middlePoker.index, middlePoker.color, middlePoker.size));
                }
                for (int j = 0; j < ssz_seat.thirdPokerInfoCount(); ++j)
                {
                    THIRD_POKER_INFO endPoker = ssz_seat.getThirdPokerInfo(j);
                    seat.endPokerList.Add(new Poker(endPoker.index, endPoker.color, endPoker.size));
                }
                CurrentRoom.SeatList.Add(seat);
            }
            if (proto.roomInfo.seatInfoCount() == 3)
            {
                CurrentRoom.SeatList.Add(new SeatEntity());
            }
            CalculateSeatIndexOne();
        }