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


Java Game类代码示例

本文整理汇总了Java中com.google.android.gms.games.Game的典型用法代码示例。如果您正苦于以下问题:Java Game类的具体用法?Java Game怎么用?Java Game使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Game类属于com.google.android.gms.games包,在下文中一共展示了Game类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: a

import com.google.android.gms.games.Game; //导入依赖的package包/类
public a(Leaderboard paramLeaderboard)
{
  this.vD = paramLeaderboard.getLeaderboardId();
  this.qa = paramLeaderboard.getDisplayName();
  this.sL = paramLeaderboard.getIconImageUri();
  this.vE = paramLeaderboard.getScoreOrder();
  Game localGame = paramLeaderboard.getGame();
  GameEntity localGameEntity;
  if (localGame == null)
    localGameEntity = null;
  else
    localGameEntity = new GameEntity(localGame);
  this.vG = localGameEntity;
  ArrayList localArrayList = paramLeaderboard.getVariants();
  int i = localArrayList.size();
  this.vF = new ArrayList(i);
  for (int j = 0; j < i; j++)
    this.vF.add((f)((LeaderboardVariant)localArrayList.get(j)).freeze());
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:20,代码来源:a.java

示例2: getGame

import com.google.android.gms.games.Game; //导入依赖的package包/类
public final Game getGame()
{
  return this.vG;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:b.java

示例3: getGame

import com.google.android.gms.games.Game; //导入依赖的package包/类
public final Game getGame()
{
  return this.wj;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:InvitationEntity.java

示例4: getCurrentGame

import com.google.android.gms.games.Game; //导入依赖的package包/类
public final Game getCurrentGame(GoogleApiClient paramGoogleApiClient)
{
  return Games.j(paramGoogleApiClient).getCurrentGame();
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:fu.java

示例5: onGamesLoaded

import com.google.android.gms.games.Game; //导入依赖的package包/类
@Override
public void onGamesLoaded (int statusCode, GameBuffer buffer){
    JSONObject json = new JSONObject();
    try{
        json.put("type", GAMES_LOADED);
        json.put("statusCode", statusCode);
        switch (statusCode) {
            case GamesClient.STATUS_OK:
                // if data was successfully loaded and is up-to-date.
                JSONArray games = new JSONArray();
                JSONObject game;
                for(int i=0,l=buffer.getCount(); i<l; i++){
                    Game g = buffer.get(i);
                    game = new JSONObject();
                    game.put("achievementTotalCount", g.getAchievementTotalCount());
                    game.put("applicationId", g.getApplicationId());
                    game.put("description", g.getDescription());
                    game.put("developerName", g.getDeveloperName());
                    game.put("displayName", g.getDisplayName());
                    Uri uri = g.getFeaturedImageUri();
                    if (null != uri)
                        game.put("featuredImageUri", uri.getScheme()+':'+uri.getSchemeSpecificPart());
                    uri = g.getHiResImageUri();
                    if (null != uri)
                        game.put("hiResImageUri", uri.getScheme()+':'+uri.getSchemeSpecificPart());
                    uri = g.getIconImageUri();
                    if (null != uri)
                        game.put("iconImageUri", uri.getScheme()+':'+uri.getSchemeSpecificPart());
                    game.put("leaderboardCount", g.getLeaderboardCount());
                    game.put("primaryCategory", g.getPrimaryCategory());
                    game.put("secondaryCategory", g.getSecondaryCategory());
                    games.put(game);
                }
                json.put("list", games);
                break;        
            case GamesClient.STATUS_INTERNAL_ERROR:
                // if an unexpected error occurred in the service 
                break;
            case GamesClient.STATUS_NETWORK_ERROR_STALE_DATA:
                // if the device was unable to communicate with the network. In this case, the operation is not retried automatically.
                break;
            case GamesClient.STATUS_CLIENT_RECONNECT_REQUIRED:
                // need to reconnect GamesClient
                mHelper.reconnectClients(clientTypes);
                break;
            case GamesClient.STATUS_LICENSE_CHECK_FAILED:
                // The game is not licensed to the user. Further calls will return the same code.
                break;
            default:
                // error
                break;
        }
    }catch(JSONException ex){
        Log.e(TAG, "GAMES_LOADED ["+statusCode+"] exception: "+ex.getMessage());
        return;
    }

    buffer.close();
    PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, json);
    pluginResult.setKeepCallback(true);
    connectionCB.sendPluginResult(pluginResult);
}
 
开发者ID:ldarren,项目名称:pico-phonegap-base,代码行数:63,代码来源:PlayServices.java

示例6: b

import com.google.android.gms.games.Game; //导入依赖的package包/类
public final Game b()
{
  return this.a;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:5,代码来源:InvitationEntity.java

示例7: q

import com.google.android.gms.games.Game; //导入依赖的package包/类
private Game q()
{
  return new GameEntity(this);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:5,代码来源:bf.java

示例8: b

import com.google.android.gms.games.Game; //导入依赖的package包/类
public final Game b()
{
  return this.c;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:5,代码来源:bw.java

示例9: getGame

import com.google.android.gms.games.Game; //导入依赖的package包/类
public abstract Game getGame(); 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:2,代码来源:Leaderboard.java

示例10: b

import com.google.android.gms.games.Game; //导入依赖的package包/类
public abstract Game b(); 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:2,代码来源:Invitation.java


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