Example #1
0
    void MatchFoundCallback(Message <Room> msg)
    {
        Debug.Log("Found match. Room id = " + msg.Data.ID);

        roomId = msg.Data.ID;

        Matchmaking.JoinRoom(msg.Data.ID, true).OnComplete(JoinRoomCallback);
    }
Example #2
0
        void MatchFoundCallback(Message <Room> msg)
        {
            if (msg.IsError)
            {
                Debug.Log(msg.GetError().Message);
                TransitionToState(MatchRoomState.None);
                return;
            }

            if (m_state != MatchRoomState.Queued)
            {
                // ignore callback - user already cancelled
                return;
            }

            // since this example communicates via updates to the datastore, it's vital that
            // we subscribe to room updates
            Matchmaking.JoinRoom(msg.Data.ID, true /* subscribe to update notifications */)
            .OnComplete(MatchmakingJoinRoomCallback);
            m_matchRoom = msg.Data.ID;
        }
Example #3
0
 void JoinRoom(Message <Room> message)
 {
     Debug.Log("Found match. Room id = " + message.Data.ID);
     roomId = message.Data.ID;
     Matchmaking.JoinRoom(message.Data.ID, true).OnComplete(StartConnectionToServer);
 }
Example #4
0
 void MatchFoundCallback(Message <Room> msg)
 {
     m_matchRoom = msg.Data.ID;
     Matchmaking.JoinRoom(msg.Data.ID, true).OnComplete(MatchmakingJoinRoomCallback);
 }