/// <summary> /// Handles an <c>onSubmitScoreFinished</c> event /// </summary> /// <param name="message"> /// Will contain a numeric representation of <c>Provider</c>, /// and payload</param> public void onSubmitScoreFinished(String message) { SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onSubmitScoreFinished"); JSONObject eventJson = new JSONObject(message); Provider provider = Provider.fromInt ((int)eventJson["provider"].n); Leaderboard owner = new Leaderboard(eventJson["leaderboard"]); Score score = new Score(eventJson["score"]); JSONObject payloadJSON = new JSONObject(eventJson ["payload"].str); ProfileEvents.OnSubmitScoreFinished(new SubmitScoreFinishedEvent(provider, owner, score, ProfilePayload.GetUserPayload(payloadJSON))); }
public SubmitScoreFinishedEvent(Provider provider, Leaderboard destination, Score newScore, string payload) : base(provider, payload) { this.Destination = destination; this.Score = newScore; }