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); }
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); }