예제 #1
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);
    }
예제 #2
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);
    }
예제 #3
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);
    }
예제 #4
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);
    }
예제 #5
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);
    }
예제 #6
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);
    }
예제 #7
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);
    }