Пример #1
0
 public void UserSitDown(HallTransfer.RoomUserInfo userInfo)
 {
     if (m_lblUserID != null)
     {
         m_lblUserID.text = userInfo.dwUserId.ToString();
     }
     if (m_lblUserName != null)
     {
         m_lblUserName.text = userInfo.dwNickName.ToString();
     }
     if (m_lblUserMoney != null)
     {
         m_lblUserMoney.text = userInfo.dwMoney.ToString();
     }
     if (m_lblGameCount != null)
     {
         m_lblGameCount.text = userInfo.dwGameCount.ToString();
     }
     if (m_sprUserFace != null)
     {
         m_sprUserFace.gameObject.SetActive(true);
         m_sprUserFace.spriteName = "face_" + userInfo.dwLogoID.ToString();
     }
     empty = false;
 }
Пример #2
0
        //游戏中用户坐下
        public void OnSendUserSitInfo(uint uid, ushort desk, ushort chairs)
        {
            if (GameApp.GameData.EnterRoomID == 0)
            {
                return;
            }


            SGameRoomItem item = GameApp.GameListMgr.FindRoomItem(GameApp.GameData.EnterRoomID);

            if (item == null || item.AutoSit)
            {
                return;
            }

            if (desk != CommonDefine.INVALID_TABLE && chairs != CommonDefine.INVALID_CHAIR)
            {
                PlayerInfo temp = GameApp.GameSrv.FindPlayer(uid);
                HallTransfer.RoomUserInfo tempRoomUserInfo = new HallTransfer.RoomUserInfo();
                tempRoomUserInfo.dwUserId    = uid;
                tempRoomUserInfo.dwNickName  = temp.NickName;
                tempRoomUserInfo.dwLogoID    = temp.HeadID;
                tempRoomUserInfo.dwMoney     = temp.Money;
                tempRoomUserInfo.dwDesk      = desk;
                tempRoomUserInfo.dwChair     = chairs;
                tempRoomUserInfo.dwGameCount = 10;                      //暂时写死
                HallTransfer.Instance.cnShowUserInfo(tempRoomUserInfo); //发送进入玩家数据
            }
        }
Пример #3
0
 //用户列表中用户坐下信息
 private void SendUserSitInfo(PlayerInfo player)
 {
     HallTransfer.RoomUserInfo tempRoomUserInfo = new HallTransfer.RoomUserInfo();
     tempRoomUserInfo.dwUserId    = player.ID;
     tempRoomUserInfo.dwNickName  = player.NickName;
     tempRoomUserInfo.dwLogoID    = player.HeadID;
     tempRoomUserInfo.dwMoney     = player.Money;
     tempRoomUserInfo.dwDesk      = player.DeskNO;
     tempRoomUserInfo.dwChair     = player.DeskStation;
     tempRoomUserInfo.dwGameCount = 10;                      //暂时写死
     HallTransfer.Instance.cnShowUserInfo(tempRoomUserInfo); //发送其他在线玩家数据*/
 }
Пример #4
0
        private void SendAllUserSitInfo()
        {
            PlayerInfo[] players = GameApp.GameSrv.GetAllPlayers();

            List <HallTransfer.RoomUserInfo> AllUserInfo = new List <HallTransfer.RoomUserInfo>();

            foreach (PlayerInfo temp in players)
            {
                if (temp.DeskNO != CommonDefine.INVALID_TABLE && temp.DeskStation != CommonDefine.INVALID_TABLE)
                {
                    HallTransfer.RoomUserInfo tempRoomUserInfo = new HallTransfer.RoomUserInfo();
                    tempRoomUserInfo.dwUserId    = temp.ID;
                    tempRoomUserInfo.dwNickName  = temp.NickName;
                    tempRoomUserInfo.dwLogoID    = temp.HeadID;
                    tempRoomUserInfo.dwMoney     = temp.Money;
                    tempRoomUserInfo.dwDesk      = temp.DeskNO;
                    tempRoomUserInfo.dwChair     = temp.DeskStation;
                    tempRoomUserInfo.dwGameCount = 10;//暂时写死
                    AllUserInfo.Add(tempRoomUserInfo);
                }
            }
            HallTransfer.Instance.cnShowUserInfo(AllUserInfo);
        }