Ejemplo n.º 1
0
        public IEnumerator GetMatch()
        {
            ExecutionCompleted = false;

            PlayFabMultiplayerAPI.GetMatch(
                new GetMatchRequest
            {
                EscapeObject           = QueueConfiguration.EscapeObject,
                MatchId                = MatchmakingTicketStatus.MatchId,
                QueueName              = QueueConfiguration.QueueName,
                ReturnMemberAttributes = QueueConfiguration.ReturnMemberAttributes,
                AuthenticationContext  = PlayFabAuthenticationContext,
            },
                (result) =>
            {
                ExecutionCompleted = true;
                MatchResult        = result;
            },
                (error) =>
            {
                var result = $"On GetMatch failed. Message: {error.ErrorMessage}, Code: {error.HttpCode}";
                Debug.Log(result);
            }
                );

            yield return(WaitForExecution());
        }
Ejemplo n.º 2
0
    private void PrepareMatch(string matchId)
    {
        var request = new GetMatchRequest
        {
            MatchId   = matchId,
            QueueName = PlayfabUtils.MATCHMAKING_NAME,
        };

        PlayFabMultiplayerAPI.GetMatch(request, OnMatchGet, OnError);
    }
Ejemplo n.º 3
0
    private void MatchFound(GetMatchmakingTicketResult getMatchmakingTicketResult)
    {
        // When we find a match, we need to request the connection variables to join clients
        PlayFabMultiplayerAPI.GetMatch(
            new GetMatchRequest {
            MatchId   = getMatchmakingTicketResult.MatchId,
            QueueName = matchmakingQueue
        },

            this.OnGetMatch,
            this.OnPlayFabError
            );
    }
    private void StartMatch(string matchId)
    {
        queueStatusText.text = $"Starting Match...";

        PlayFabMultiplayerAPI.GetMatch(
            new GetMatchRequest
        {
            MatchId   = matchId,
            QueueName = queueName,
            ReturnMemberAttributes = true
        },
            OnGetMatch,
            OnMatchmakingError
            );
    }
Ejemplo n.º 5
0
 void GetMatch(string matchId)
 {
     PlayFabMultiplayerAPI.GetMatch(
         new GetMatchRequest {
         MatchId = matchId,
         ReturnMemberAttributes = true,
         QueueName = QUEUE_NAME,
     },
         result => {
         PhotonManager.SetProperties(TextController.DisplayName, PlayerDataManager.PlayerData.Rating);
         PhotonManager.JoinOrCreateRoom(result.MatchId);
     },
         error => {
         Debug.LogError(error.GenerateErrorReport());
     }
         );
 }