只有一个参与者ID在onTurnBasedMatchReceived() [英] Only One Participant ID in onTurnBasedMatchReceived()

查看:159
本文介绍了只有一个参与者ID在onTurnBasedMatchReceived()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在对方球员转弯时,我成功地接收到onTurnBasedMatchReceived()的更新,但在比赛中的细节,有时只有我自己participantId。如果不知道对方球员的ParticipantId,我不能做一个takeTurn和ID传递给其他玩家。为什么我有时不能得到其他玩家的ID,有时我怎么办?

When the other player makes a turn, I am successfully receiving an "onTurnBasedMatchReceived()" update, but in the match details there is sometimes only my own participantId. Without knowing the other player's ParticipantId, I cannot do a takeTurn and pass the ID to the other player. Why do I sometimes not get the other player's ID and sometimes I do?

推荐答案

如果您已经自动匹配与随机的对手,而不是采取先转呢,那么你将只能得到一个参与者标识。就在传递给 takeTurn()为pendingParticipantId领域。

If you've auto-matched with a random opponent and not taken the first turn yet, then you will only get one Participant Id. Just pass in null to takeTurn() for the pendingParticipantId field.

这篇关于只有一个参与者ID在onTurnBasedMatchReceived()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆