Exemplo n.º 1
0
    /// <summary>
    /// callback method for native code to communicate events back to unity
    /// </summary>
    public static void RequestPercentileRanksSucceeded(string json)
    {
        AGSRequestPercentilesResponse response = AGSRequestPercentilesResponse.FromJSON(json);

        if (!response.IsError() && RequestPercentileRanksSucceededEvent != null)
        {
            RequestPercentileRanksSucceededEvent(response.leaderboard, response.percentiles, response.userIndex);
        }
        if (RequestPercentileRanksCompleted != null)
        {
            RequestPercentileRanksCompleted(response);
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// callback method for native code to communicate events back to unity
    /// </summary>
    public static void RequestPercentileRanksFailed(string json)
    {
        AGSRequestPercentilesResponse response = AGSRequestPercentilesResponse.FromJSON(json);

        if (response.IsError() && RequestPercentileRanksFailedEvent != null)
        {
            RequestPercentileRanksFailedEvent(response.leaderboardId, response.error);
        }
        if (RequestPercentileRanksCompleted != null)
        {
            RequestPercentileRanksCompleted(response);
        }
    }