Exemple #1
0
    private void OnInvitationAcceptedCallback(string data)
    {
        Debug.Log("OnInvitationAcceptedCallback received");

        string[] DataArray = data.Split(AndroidNative.DATA_SPLITTER[0]);


        string invitationId = "";
        GP_TBM_MatchInitiatedResult result = new GP_TBM_MatchInitiatedResult(DataArray[0]);



        if (DataArray.Length > 1)
        {
            invitationId = DataArray[1];

            GP_TBM_Match match = ParceMatchInfo(DataArray, 2);
            UpdateMatchInfo(match);
            result.Match = match;
        }

        Debug.Log("OnInvitationAcceptedCallback fired " + result.IsSucceeded);

        ActionMatchInvitationAccepted(invitationId, result);
    }
    //GooglePlayTBM.Action



    private void GooglePlayTBM_ActionMatchInvitationAccepted(string arg1, GP_TBM_MatchInitiatedResult arg2)
    {
        Debug_previous_method_name();
        Common.DebugPopUp("Action match invitation accepted arg1 is " + arg1, " starting to deal with data");
        //  AN_PoupsProxy.showMessage("Action match invitation accepted arg1 is "+arg1, " starting to deal with data");
        DealWithMatchData(arg2.Match);
    }
Exemple #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);
    }
Exemple #4
0
    private void OnMatchInitiatedCallback(string data)
    {
        string[] DataArray = data.Split(AndroidNative.DATA_SPLITTER[0]);

        GP_TBM_MatchInitiatedResult result = new GP_TBM_MatchInitiatedResult(DataArray[0]);

        if (DataArray.Length > 1)
        {
            GP_TBM_Match match = ParceMatchInfo(DataArray, 1);
            UpdateMatchInfo(match);
            result.Match = match;
        }

        ActionMatchInitiated(result);
    }
Exemple #5
0
    void ActionMatchInitiated(GP_TBM_MatchInitiatedResult result)
    {
        if(!result.isSuccess) {
            AndroidMessage.Create("Match Initi Failed", "Status code: " + result.response);
            return;
        }

        GP_TBM_Match  Match = result.Match;
        // If this player is not the first player in this match, continue.
        if (Match.Data != null) {
            //showTurnUI(match);
            return;
        }

        // Otherwise, this is the first player. Initialize the game state.
        //initGame(match);

        // Let the player take the first turn
        //showTurnUI(match);
    }
Exemple #6
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);
    }
    void ActionMatchInitiated(GP_TBM_MatchInitiatedResult result)
    {
        Debug_previous_method_name();
        unShowLoadingPopUp();

        if (!result.IsSucceeded)
        {
            AndroidMessage.Create("Match Initi Failed", "Status code: " + result.Response);
            return;
        }


        // If this player is not the first player in this match, continue.
        AndroidMessage.Create("Match Initiated ", "Status code: " + result.Response);
        int counter = 0;

        GP_TBM_Match Match = result.Match;

        mMatch = result.Match;
        DealWithMatchData(mMatch);
    }
    void ActionMatchInitiated(GP_TBM_MatchInitiatedResult result)
    {
        if (!result.IsSucceeded)
        {
            AndroidMessage.Create("Match Initi Failed", "Status code: " + result.Response);
            return;
        }

        GP_TBM_Match Match = result.Match;

        // If this player is not the first player in this match, continue.
        if (Match.Data != null)
        {
            //showTurnUI(match);
            return;
        }

        // Otherwise, this is the first player. Initialize the game state.
        //initGame(match);

        // Let the player take the first turn
        //showTurnUI(match);
    }