示例#1
0
        /// <summary>
        /// Handles an <c>onReportScoreFailed</c> event
        /// </summary>
        /// <param name="message">
        /// Will contain a numeric representation of <c>Provider</c>,
        /// and payload</param>
        public void onReportScoreFailed(String message)
        {
            SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onReportScoreFailed");

            JSONObject eventJson = new JSONObject(message);

            Provider    provider     = Provider.fromInt((int)eventJson["provider"].n);
            Leaderboard owner        = new Leaderboard(eventJson["leaderboard"]);
            String      errorMessage = eventJson["message"].str;

            JSONObject payloadJSON = new JSONObject(eventJson ["payload"].str);

            ProfileEvents.OnReportScoreFailed(new ReportScoreFailedEvent(provider, owner, errorMessage, ProfilePayload.GetUserPayload(payloadJSON)));
        }