本文整理汇总了Java中com.google.android.gms.games.leaderboard.Leaderboards.LoadScoresResult方法的典型用法代码示例。如果您正苦于以下问题:Java Leaderboards.LoadScoresResult方法的具体用法?Java Leaderboards.LoadScoresResult怎么用?Java Leaderboards.LoadScoresResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.games.leaderboard.Leaderboards
的用法示例。
在下文中一共展示了Leaderboards.LoadScoresResult方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: z
import com.google.android.gms.games.leaderboard.Leaderboards; //导入方法依赖的package包/类
public Leaderboards.LoadScoresResult z(final Status paramStatus)
{
return new Leaderboards.LoadScoresResult()
{
public Leaderboard getLeaderboard()
{
return null;
}
public LeaderboardScoreBuffer getScores()
{
return new LeaderboardScoreBuffer(DataHolder.empty(14));
}
public Status getStatus()
{
return paramStatus;
}
public void release()
{
}
};
}
示例2: loadMoreScores
import com.google.android.gms.games.leaderboard.Leaderboards; //导入方法依赖的package包/类
public final PendingResult<Leaderboards.LoadScoresResult> loadMoreScores(GoogleApiClient paramGoogleApiClient, final LeaderboardScoreBuffer paramLeaderboardScoreBuffer, final int paramInt1, final int paramInt2)
{
return paramGoogleApiClient.a(new c(paramLeaderboardScoreBuffer)
{
protected void a(fl paramAnonymousfl)
{
paramAnonymousfl.a(this, paramLeaderboardScoreBuffer, paramInt1, paramInt2);
}
});
}
示例3: loadPlayerCenteredScores
import com.google.android.gms.games.leaderboard.Leaderboards; //导入方法依赖的package包/类
public final PendingResult<Leaderboards.LoadScoresResult> loadPlayerCenteredScores(GoogleApiClient paramGoogleApiClient, final String paramString, final int paramInt1, final int paramInt2, final int paramInt3, final boolean paramBoolean)
{
return paramGoogleApiClient.a(new c(paramString)
{
protected void a(fl paramAnonymousfl)
{
paramAnonymousfl.b(this, paramString, paramInt1, paramInt2, paramInt3, paramBoolean);
}
});
}
示例4: loadTopScores
import com.google.android.gms.games.leaderboard.Leaderboards; //导入方法依赖的package包/类
public final PendingResult<Leaderboards.LoadScoresResult> loadTopScores(GoogleApiClient paramGoogleApiClient, final String paramString, final int paramInt1, final int paramInt2, final int paramInt3, final boolean paramBoolean)
{
return paramGoogleApiClient.a(new c(paramString)
{
protected void a(fl paramAnonymousfl)
{
paramAnonymousfl.a(this, paramString, paramInt1, paramInt2, paramInt3, paramBoolean);
}
});
}
示例5: onResult
import com.google.android.gms.games.leaderboard.Leaderboards; //导入方法依赖的package包/类
public void onResult( Leaderboards.LoadScoresResult scoresResult ) {
LeaderboardScoreBuffer scores = scoresResult.getScores();
if( scores.getCount() == currentBufferSize ) {
Extension.context.onLeaderboardLoaded(scores);
}
else {
currentBufferSize = scores.getCount();
Games.Leaderboards.loadMoreScores( Extension.context.getApiClient(), scores, 25, PageDirection.NEXT ).setResultCallback( this );
}
}
示例6: fetchLeaderboardEntriesSync
import com.google.android.gms.games.leaderboard.Leaderboards; //导入方法依赖的package包/类
private boolean fetchLeaderboardEntriesSync(String leaderBoardId, int limit, boolean relatedToPlayer,
IFetchLeaderBoardEntriesResponseListener callback) {
if (!isSessionActive())
return false;
if (gpgsLeaderboardIdMapper != null)
leaderBoardId = gpgsLeaderboardIdMapper.mapToGsId(leaderBoardId);
Leaderboards.LoadScoresResult scoresResult =
(relatedToPlayer ?
Games.Leaderboards.loadTopScores(mGoogleApiClient, leaderBoardId,
LeaderboardVariant.TIME_SPAN_ALL_TIME, LeaderboardVariant.COLLECTION_PUBLIC,
MathUtils.clamp(limit, 1, 25), forceRefresh).await()
:
Games.Leaderboards.loadPlayerCenteredScores(mGoogleApiClient, leaderBoardId,
LeaderboardVariant.TIME_SPAN_ALL_TIME, LeaderboardVariant.COLLECTION_PUBLIC,
MathUtils.clamp(limit, 1, 25), forceRefresh).await());
if (!scoresResult.getStatus().isSuccess()) {
Gdx.app.log(GAMESERVICE_ID, "Failed to fetch leaderboard entries:" +
scoresResult.getStatus().getStatusMessage());
callback.onLeaderBoardResponse(null);
return false;
}
LeaderboardScoreBuffer scores = scoresResult.getScores();
Array<ILeaderBoardEntry> gpgsLbEs = new Array<ILeaderBoardEntry>(scores.getCount());
String playerDisplayName = getPlayerDisplayName();
for (LeaderboardScore score : scores) {
GpgsLeaderBoardEntry gpgsLbE = new GpgsLeaderBoardEntry();
gpgsLbE.userDisplayName = score.getScoreHolderDisplayName();
gpgsLbE.currentPlayer = gpgsLbE.userDisplayName.equalsIgnoreCase(playerDisplayName);
gpgsLbE.formattedValue = score.getDisplayScore();
gpgsLbE.scoreRank = score.getDisplayRank();
gpgsLbE.userId = score.getScoreHolder().getPlayerId();
gpgsLbE.sortValue = score.getRawScore();
gpgsLbE.scoreTag = score.getScoreTag();
gpgsLbEs.add(gpgsLbE);
}
scores.release();
callback.onLeaderBoardResponse(gpgsLbEs);
return true;
}