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


Java TurnBasedMultiplayer.UpdateMatchResult方法代码示例

本文整理汇总了Java中com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer.UpdateMatchResult方法的典型用法代码示例。如果您正苦于以下问题:Java TurnBasedMultiplayer.UpdateMatchResult方法的具体用法?Java TurnBasedMultiplayer.UpdateMatchResult怎么用?Java TurnBasedMultiplayer.UpdateMatchResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer的用法示例。


在下文中一共展示了TurnBasedMultiplayer.UpdateMatchResult方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processResult

import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer; //导入方法依赖的package包/类
public void processResult(TurnBasedMultiplayer.UpdateMatchResult result) {
    TurnBasedMatch match = result.getMatch();
    dismissSpinner();
    if (!checkStatusCode(match, result.getStatus().getStatusCode())) {
        return;
    }
    if (match.canRematch()) {
        askForRematch();
    }

    isDoingTurn = (match.getTurnStatus() == TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN);

    if (isDoingTurn) {
        updateMatch(match);
        return;
    }

    setViewVisibility();
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:20,代码来源:SkeletonActivity.java

示例2: processResult

import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer; //导入方法依赖的package包/类
public void processResult(TurnBasedMultiplayer.UpdateMatchResult result) {
	TurnBasedMatch match = result.getMatch();
	
	if (!checkStatusCode(match, result.getStatus().getStatusCode()))
		return;

	isDoingTurn = (match.getTurnStatus() == TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN);

	if (isDoingTurn) {
		updateMatch(match);
		return;
	}
}
 
开发者ID:antonioalmeida,项目名称:retro-reversi,代码行数:14,代码来源:AndroidLauncher.java

示例3: finishMatch

import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer; //导入方法依赖的package包/类
public final PendingResult<TurnBasedMultiplayer.UpdateMatchResult> finishMatch(GoogleApiClient paramGoogleApiClient, String paramString, byte[] paramArrayOfByte, List<ParticipantResult> paramList)
{
  ParticipantResult[] arrayOfParticipantResult;
  if (paramList == null)
    arrayOfParticipantResult = null;
  else
    arrayOfParticipantResult = (ParticipantResult[])paramList.toArray(new ParticipantResult[paramList.size()]);
  return finishMatch(paramGoogleApiClient, paramString, paramArrayOfByte, arrayOfParticipantResult);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:10,代码来源:gb.java

示例4: takeTurn

import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer; //导入方法依赖的package包/类
public final PendingResult<TurnBasedMultiplayer.UpdateMatchResult> takeTurn(GoogleApiClient paramGoogleApiClient, String paramString1, byte[] paramArrayOfByte, String paramString2, List<ParticipantResult> paramList)
{
  ParticipantResult[] arrayOfParticipantResult;
  if (paramList == null)
    arrayOfParticipantResult = null;
  else
    arrayOfParticipantResult = (ParticipantResult[])paramList.toArray(new ParticipantResult[paramList.size()]);
  return takeTurn(paramGoogleApiClient, paramString1, paramArrayOfByte, paramString2, arrayOfParticipantResult);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:10,代码来源:gb.java

示例5: H

import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer; //导入方法依赖的package包/类
public TurnBasedMultiplayer.UpdateMatchResult H(final Status paramStatus)
{
  return new TurnBasedMultiplayer.UpdateMatchResult()
  {
    public TurnBasedMatch getMatch()
    {
      return null;
    }

    public Status getStatus()
    {
      return paramStatus;
    }
  };
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:16,代码来源:gb.java

示例6: processResult

import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer; //导入方法依赖的package包/类
private void processResult(TurnBasedMultiplayer.UpdateMatchResult result) {
    TurnBasedMatch match = result.getMatch();
    int status = result.getStatus().getStatusCode();
    if (status != GamesStatusCodes.STATUS_OK && status != GamesStatusCodes.STATUS_NETWORK_ERROR_OPERATION_DEFERRED) {
        return;
    }

    int turnStatus = match.getTurnStatus();
    if (turnStatus == TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN) {
        playTurn(match);
    } else if (turnStatus == TurnBasedMatch.MATCH_TURN_STATUS_COMPLETE) {
        EventBus.getDefault().post(new GameEndedEvent(false));
    }
}
 
开发者ID:dbaelz,项目名称:NotAlways42,代码行数:15,代码来源:MultiplayerFragment.java


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