void HandleTurnEndedEvent(UM_TBM_MatchResult res) { if (res.IsSucceeded) { RS_LevelLoader.LoadLevel(RS_Scene.RS_Garage); } }
void HandleMatchLoadedEvent(UM_TBM_MatchResult res) { if (res.IsSucceeded) { RS_TBM_RaceController.CurrentMatch = res.Match; RS_LevelLoader.LoadLevel(RS_Scene.RS_DesertTrack); } }
void HandleMatchUpdatedEvent(UM_TBM_MatchResult res) { Debug.Log("HandleMatchUpdatedEvent " + res.IsSucceeded); if (res.IsSucceeded) { RS_LevelLoader.LoadLevel(RS_Scene.RS_Garage); } }
private void HandleActionInvitationAccepted(UM_TBM_MatchResult result) { if (result.IsSucceeded) { MatchPanelUI panel = CreateNewMatchPanel(result.Match.Status == UM_TBM_MatchStatus.Ended ? FinishedMatchesHolder : ActiveMatchesHolder); panel.SetMatchInfo(result.Match); if (!matchUIs.ContainsKey(result.Match.Id)) { matchUIs.Add(result.Match.Id, panel); } } }
void HandleActionTurnFinished(GP_TBM_UpdateMatchResult res) { UM_TBM_MatchResult result = new UM_TBM_MatchResult(res); if (res.Match != null) { UM_TBM_Match match = new UM_TBM_Match(res.Match); result.SetMatch(match); UpdateMatchData(match); } TurnEndedEvent(result); }
void HandleActionMatchDataLoaded(GP_TBM_LoadMatchResult res) { UM_TBM_MatchResult result = new UM_TBM_MatchResult(res); if (res.Match != null) { UM_TBM_Match match = new UM_TBM_Match(res.Match); result.SetMatch(match); UpdateMatchData(match); } MatchLoadedEvent(result); }
//-------------------------------------- // Action Handlers //-------------------------------------- void HandleActionMatchInitiated(GP_TBM_MatchInitiatedResult res) { UM_TBM_MatchResult result = new UM_TBM_MatchResult(res); if (res.Match != null) { UM_TBM_Match match = new UM_TBM_Match(res.Match); result.SetMatch(match); UpdateMatchData(match); } MatchFoundEvent(result); }
//-------------------------------------- // Private Methods //-------------------------------------- public void SendMatchUpdateEvent(SA.Common.Models.Result res, GK_TBM_Match match) { UM_TBM_MatchResult result = new UM_TBM_MatchResult(res); if (match != null) { UM_TBM_Match m = new UM_TBM_Match(match); result.SetMatch(m); UpdateMatchData(m); } MatchUpdatedEvent(result); }
void HandleActionMatchInfoLoaded(GK_TBM_LoadMatchResult res) { Debug.Log("GK_TBM_Controller::HandleActionMatchInfoLoaded"); UM_TBM_MatchResult result = new UM_TBM_MatchResult(res); if (res.Match != null) { UM_TBM_Match match = new UM_TBM_Match(res.Match); UpdateMatchData(match); result.SetMatch(match); } MatchLoadedEvent(result); }
void HandleActionMatchInvitationAccepted(GK_TBM_MatchInitResult res) { UM_TBM_MatchResult result = new UM_TBM_MatchResult(res); if (res.IsSucceeded) { RemoveInvitationsFromTheList(res.Match.Id); UM_TBM_Match match = new UM_TBM_Match(res.Match); result.SetMatch(match); UpdateMatchData(match); } InvitationAccepted(result); }
private void HandleActionMatchFound(UM_TBM_MatchResult res) { Debug.Log("HandleActionMatchFound " + res.IsSucceeded); if (res.IsSucceeded) { //Redirect to the play scene and make a move RS_GamePlayController.Mode = RS_GameMode.Multiplayer; RS_GamePlayController.ActiveMatch = res.Match; RS_PlayerData.Instance.MultiplayerTickets--; RS_LevelLoader.LoadLevel(RS_Scene.RS_DesertTrack); } else { Debug.Log("[HandleActionMatchFound] error " + res.Error.Description); } }
private void TBM_Matchmaker_MatchUpdatedEvent(UM_TBM_MatchResult result) { if (result.IsSucceeded) { if (matchUIs.ContainsKey(result.Match.Id)) { if (result.Match.Status == UM_TBM_MatchStatus.Ended) { matchUIs [result.Match.Id].transform.SetParent(FinishedMatchesHolder.transform); matchUIs [result.Match.Id].transform.localScale = Vector3.one; } else { matchUIs[result.Match.Id].transform.SetParent(ActiveMatchesHolder.transform); matchUIs[result.Match.Id].transform.localScale = Vector3.one; } matchUIs [result.Match.Id].SetMatchInfo(result.Match); } } }
void HandleActionMatchInvitationAccepted(string invitationId, GP_TBM_MatchInitiatedResult res) { Debug.Log("GP_TBM_Controller::HandleActionMatchInvitationAccepted"); UM_TBM_MatchResult result = new UM_TBM_MatchResult(res); if (res.IsSucceeded) { RemoveInvitationsFromTheList(invitationId); UM_TBM_Match match = new UM_TBM_Match(res.Match); result.SetMatch(match); UpdateMatchData(match); Debug.Log("GP_TBM_Controller::HandleActionMatchInvitationAccepted, list updated"); } InvitationAccepted(result); }