当前位置: 首页>>代码示例>>Java>>正文


Java Leaderboards.LoadScoresResult方法代码示例

本文整理汇总了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()
    {
    }
  };
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:25,代码来源:fw.java

示例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);
    }
  });
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:fw.java

示例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);
    }
  });
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:fw.java

示例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);
    }
  });
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:fw.java

示例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 );
        }

    }
 
开发者ID:freshplanet,项目名称:ANE-Google-Play-Game-Services,代码行数:15,代码来源:ScoresLoadedListener.java

示例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;
}
 
开发者ID:MrStahlfelge,项目名称:gdx-gamesvcs,代码行数:51,代码来源:GpgsClient.java


注:本文中的com.google.android.gms.games.leaderboard.Leaderboards.LoadScoresResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。