1

我无法将玩家带到候诊室...他们要去候诊室,但我面临的问题是,只有当所有必需的玩家都连接时,房间才会连接。比如我想要 4 人游戏在候诊室,我想要连接到房间后立即显示连接的玩家名称,但房间仅在所有 4 名玩家出现时才连接

 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); 
4

0 回答 0