本文整理汇总了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();
}
示例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;
}
}
示例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);
}
示例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);
}
示例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;
}
};
}
示例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));
}
}