コード例 #1
0
    //not currently being used
    private void sendCustomMatchResult(long score, float visualScore)
    {
        Debug.Log("sendCustomMatchResult");

        // construct custom leader board score currency dictionary for auxScore1
        Dictionary <string, object> auxScore1Currency = new Dictionary <string, object> ();

        auxScore1Currency.Add("id", "visualScore");
        auxScore1Currency.Add("score", visualScore);
        auxScore1Currency.Add("visualScore", visualScore.ToString());

        // construct array of custom leader board score currencies
        List <object> currencies = new List <object> ();

        currencies.Add(auxScore1Currency);

        // construct match data dictionary
        Dictionary <string, object> matchData = new Dictionary <string, object> ();

        matchData.Add("currencies", currencies);

        Dictionary <string, object> matchResult = new Dictionary <string, object> ();

        matchResult.Add("tournamentID", m_matchData.TournamentID);
        matchResult.Add("matchID", m_matchData.MatchID);
        matchResult.Add("score", m_matchData.MatchScore);
        matchResult.Add("matchData", matchData);

#if PROPELLER_SDK
        PropellerSDK.SubmitMatchResult(matchResult);
        NotificationCenter.DefaultCenter.PostNotification(getMainMenuClass(), "AddTransOverlay");
        PropellerSDK.Launch(m_listener);
#endif
    }
コード例 #2
0
    private void sendMatchResult(long score)
    {
        Debug.Log("sendMatchResult");

        long visualScore = score;

        Dictionary <string, object> matchResult = new Dictionary <string, object> ();

        matchResult.Add("tournamentID", m_matchData.TournamentID);
        matchResult.Add("matchID", m_matchData.MatchID);
        matchResult.Add("score", m_matchData.MatchScore);
        string visualScoreStr = visualScore.ToString() + " : " + m_matchData.MatchMaxSpeed.ToString() + " mps";

        matchResult.Add("visualScore", visualScoreStr);

#if PROPELLER_SDK
        PropellerSDK.SubmitMatchResult(matchResult);
#endif
    }