基于回合的多人比赛开始错误

时间:2016-02-02 09:42:14

标签: android google-play-games google-play-developer-api

我在我的应用中添加了一款基于回合制的多人游戏。在google developer documentation中 状态为IS成功时代码显示错误消息。

    public class MatchInitiatedCallback implements
        ResultCallback {

    @Override
    public void onResult(TurnBasedMultiplayer.InitiateMatchResult result) {
        // Check if the status code is not success.
        Status status = result.getStatus();
        if (status.isSuccess()) {
            showError(status.getStatusCode());
            return;
        }

        TurnBasedMatch match = result.getMatch();

        // If this player is not the first player in this match, continue.
        if (match.getData() != null) {
            showTurnUI(match);
            return;
        }

        // Otherwise, this is the first player. Initialize the game state.
        initGame(match);

        // Let the player take the first turn
        showTurnUI(match);
    }
}

这是文档中的错误还是我误解了某些内容?

0 个答案:

没有答案