Esempio n. 1
0
        void _RPC_UpdateRoomInfo(IPEndPoint remote, byte[] bytes)
        {
            FSPRoomData data = PBSerializer.Deserialize <FSPRoomData>(bytes);

            m_listPlayerInfo = data.players;

            m_isInRoom = false;
            m_isReady  = false;

            for (int i = 0; i < m_listPlayerInfo.Count; ++i)
            {
                if (m_listPlayerInfo[i].userId == m_mainUserId)
                {
                    m_isInRoom = true;
                    m_isReady  = m_listPlayerInfo[i].isReady;
                }
            }

            EventManager.Instance.SendEvent("OnRoomUpdate");
        }
Esempio n. 2
0
 private void OnRoomUpdate(FSPRoomData data)
 {
     ctlRoomPlayerList.SetData(data.players);
 }