我无法将玩家带到等候室...他们要去等候室,但面临的问题是只有在所有需要的玩家都连接好之后,房间才能连接起来。例如,我要在等候室中玩4玩家游戏,我想在他们连接到房间后立即显示Connected播放器的名称,但是仅当所有4个播放器都出现时,Room才连接
Bundle autoMatchCriteria = RoomConfig.createAutoMatchCriteria(nop, nop, 0);
// build the room config:
RoomConfig roomConfig =
RoomConfig.builder(mRoomUpdateCallback)
.setOnMessageReceivedListener(mOnRealTimeMessageReceivedListener)
.setRoomStatusUpdateCallback( mRoomStatusUpdateCallback)
.setAutoMatchCriteria(autoMatchCriteria)
.build();
// create room:
Games.getRealTimeMultiplayerClient(this, GoogleSignIn.getLastSignedInAccount(this))
.create(roomConfig);