void HandleTurnEndedEvent(UM_TBM_MatchResult res)
 {
     if (res.IsSucceeded)
     {
         RS_LevelLoader.LoadLevel(RS_Scene.RS_Garage);
     }
 }
Example #2
0
 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);
     }
 }
Example #4
0
 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);
         }
     }
 }
Example #5
0
    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);
    }
Example #6
0
    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);
    }
Example #7
0
    //--------------------------------------
    // 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);
    }
Example #8
0
    //--------------------------------------
    // 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);
    }
Example #9
0
    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);
    }
Example #10
0
    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);
    }
Example #11
0
    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);
        }
    }
Example #12
0
 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);
         }
     }
 }
Example #13
0
    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);
    }