/// <summary> /// Raises the try match error event. /// </summary> /// <param name="response">Response.</param> private void OnTryMatchError(MatchmakingResponse response) { foreach (SparkView view in sparkViews) { view.SendEvent_TryMatchError(response); } }
/// <summary> /// Sends the event try match error. /// </summary> /// <param name="response">Response.</param> public void SendEvent_TryMatchError(MatchmakingResponse response) { foreach (SparkBehaviour behaviour in ObservedBehaviours) { behaviour.Call("OnTryMatchError", response); } }
void FindMatchCallback(MatchmakingResponse response) { if (response.HasErrors) { Debug.Log("GameSparksManager: Matchmaking result: Error: " + response.Errors.JSON); OnMatchResult(false); } }
public void OnMatchmakingError(MatchmakingResponse response) { //UnblockInput(); Debug.Log("Matchmaking Error"); if (ThrottleHandler.IsRequestThrottled(response.Errors.JSON)) { Invoke("AttemptSendMatchRequest", ThrottleHandler.GetRandomTime()); } }
public void OnMatchmakingError(MatchmakingResponse response) { //UnblockInput(); Debug.Log("Matchmaking Error"); if (ThrottleHandler.IsRequestThrottled(response.Errors.JSON)) { var request = lastMatchmakingRequest; request.Send(OnMatchmakingSuccess, OnMatchmakingError); } }
public async Task ResolveMatch(IMatchResolverContext matchCtx) { try { //_logger.Log(LogLevel.Trace, "matchmaking.resolver", "Resolving a successful match.", new { }); var matchData = (MatchData)matchCtx.Match.CustomData; var response = new MatchmakingResponse(); response.gameId = "game-" + matchCtx.Match.Id; response.team1.AddRange(GetPlayers(matchCtx.Match, matchCtx.Match.Teams[0])); response.team2.AddRange(GetPlayers(matchCtx.Match, matchCtx.Match.Teams[1])); //_logger.Log(LogLevel.Trace, "matchmaking.resolver", $"sending matchmaking response", response.ForLog()); var managementClient = await _management.GetApplicationClient(); var metadata = Newtonsoft.Json.Linq.JObject.FromObject(new { gameSession = new { userIds = matchCtx.Match.AllPlayers.Select(p => p.UserId).ToList() } }); await managementClient.CreateScene( response.gameId, global::Server.App.GAMESESSION_SCENE_TYPE, false, metadata, false); _logger.Log(LogLevel.Trace, "matchmaking resolver", $"Created scene for game {response.gameId}", new { id = response.gameId, template = global::Server.App.GAMESESSION_SCENE_TYPE, isPublic = false, metadata, isPersistent = false }); _logger.Log(LogLevel.Trace, "matchmaking.resolver", "Match found and resolved.", response); matchCtx.ResolutionAction = (writerCtx => writerCtx.WriteObjectToStream(response)); } catch (Exception ex) { _logger.Log(LogLevel.Error, "matchmaking.resolver", "An exception occurred while resolving a successful match.", ex); throw; } }
private void OnMatchmakingResponseSuccess(MatchmakingResponse response) { Debug.Log("OnMatchmakingResponseSuccess"); }
public void OnMatchmakingSuccess(MatchmakingResponse response) { //UnblockInput(); Debug.Log("Matchmaking Success"); }
private void OnTryMatchError(MatchmakingResponse response) { }
private void OnTryMatchSuccess(MatchmakingResponse response) { }
public void OnMatchmakingError(MatchmakingResponse response) { //UnblockInput(); Debug.Log("Matchmaking Error"); }
private void OnMatchmakingSuccess(MatchmakingResponse response) { //LoadingManager.Instance.LoadNextScene(); //SceneManager.LoadScene("GamePlay"); }
private void OnMatchmakingError(MatchmakingResponse response) { UnblockInput(); Debug.Log(response.Errors.JSON.ToString()); }
void OnMatchMakingError(MatchmakingResponse response) { UnblockInput(); textMatchFindMessage.text = response.JSONString; }
void OnMatchMakingSuccess(MatchmakingResponse response) { textMatchFindMessage.text = response.JSONString; }
private void OnMatchmakingError(MatchmakingResponse response) { UnblockInput(); Debug.Log("Matching error response: " + response.JSONString); }
private void OnMatchmakingSuccess(MatchmakingResponse response) { Debug.Log(response.JSONString); }
private void OnMatchmakingResponseError(MatchmakingResponse response) { Debug.Log("OnMatchmakingResponseError"); MatchNotFoundEvent.Invoke(); }
private void OnTryMatchSuccess(MatchmakingResponse response) { Debug.Log("On try match success."); }
private void OnTryMatchError(MatchmakingResponse response) { Debug.Log("On try match error."); }