internal void HandleFetchScoreSummary(LeaderboardScoreData data, FetchScoreSummaryResponse response, string selfPlayerId, int maxResults, ScorePageToken token, Action <LeaderboardScoreData> callback) { if (response.GetStatus() != Status.ResponseStatus.VALID && response.GetStatus() != Status.ResponseStatus.VALID_BUT_STALE) { Logger.w("Error returned from fetchScoreSummary: " + response); data.Status = (ResponseStatus)response.GetStatus(); callback(data); return; } NativeScoreSummary summary = response.GetScoreSummary(); data.ApproximateCount = summary.ApproximateResults(); data.PlayerScore = summary.LocalUserScore().AsScore(data.Id, selfPlayerId); // if the maxResults is 0, no scores are needed, so we are done. if (maxResults <= 0) { callback(data); return; } LoadScorePage(data, maxResults, token, callback); }
internal void HandleFetchScoreSummary(LeaderboardScoreData data, FetchScoreSummaryResponse response, string selfPlayerId, int maxResults, ScorePageToken token, Action <LeaderboardScoreData> callback) { if (response.GetStatus() != CommonErrorStatus.ResponseStatus.VALID && response.GetStatus() != CommonErrorStatus.ResponseStatus.VALID_BUT_STALE) { Logger.w("Error returned from fetchScoreSummary: " + (object)response); data.Status = (GooglePlayGames.BasicApi.ResponseStatus)response.GetStatus(); callback(data); } else { NativeScoreSummary scoreSummary = response.GetScoreSummary(); data.ApproximateCount = scoreSummary.ApproximateResults(); data.PlayerScore = (IScore)scoreSummary.LocalUserScore().AsScore(data.Id, selfPlayerId); if (maxResults <= 0) { callback(data); } else { this.LoadScorePage(data, maxResults, token, callback); } } }
internal NativeScoreSummary GetScoreSummary() { return(NativeScoreSummary.FromPointer( C.LeaderboardManager_FetchScoreSummaryResponse_GetData(SelfPtr() ))); }
internal NativeScoreSummary GetScoreSummary() { return(NativeScoreSummary.FromPointer(GooglePlayGames.Native.Cwrapper.LeaderboardManager.LeaderboardManager_FetchScoreSummaryResponse_GetData(this.SelfPtr()))); }
internal NativeScoreSummary GetScoreSummary() => NativeScoreSummary.FromPointer(LeaderboardManager.LeaderboardManager_FetchScoreSummaryResponse_GetData(base.SelfPtr()));