Beispiel #1
0
        private void ClientLeaveSoloQueueRequest()
        {
            ClientLeaveSoloQueueRequestMessage msg = new ClientLeaveSoloQueueRequestMessage();

            msg.userId   = user.userId;
            msg.userName = user.userName;
            client.Send(ClientLeaveSoloQueueRequestMessage.ID, msg);
            user.isQueued = false;
            Debug.Log("Sent leave solo queue request");
        }
Beispiel #2
0
        private void OnServerLeaveSoloQueueRequest(NetworkMessage netMsg)
        {
            ClientLeaveSoloQueueRequestMessage msg = netMsg.ReadMessage <ClientLeaveSoloQueueRequestMessage>();

            Debug.Log("Server received LeaveSoloQueue request from " + msg.userId + " " + msg.userName);
            User u = usersByName[msg.userName];

            if (u.isIdentified && u.currentGameId == 0)
            {
                soloQueue.unqueueUser(u);
            }
            else
            {
                // game already found
                // sad player :)
            }
        }