Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
gpg::TurnBasedMatchConfig::Builder
#include <turn_based_match_config_builder.h>
Compila uno o más objetos TurnBasedMatchConfig.
Resumen
Constructores y destructores
|
Builder()
|
Funciones públicas
AddAllPlayersToInvite
Builder & AddAllPlayersToInvite(
const std::vector< std::string > & player_ids
)
Agrega varios jugadores a la lista de jugadores para invitarlos a la partida.
De forma predeterminada, no se agregan jugadores.
AddPlayerToInvite
Builder & AddPlayerToInvite(
const std::string & player_id
)
Agrega un jugador a la lista de jugadores para invitarlo al partido.
De forma predeterminada, no se agregan jugadores al partido. El compilador no puede crear una coincidencia hasta que se agreguen los jugadores.
Builder
Builder()
PopulateFromPlayerSelectUIResponse
Builder & PopulateFromPlayerSelectUIResponse(
const TurnBasedMultiplayerManager::PlayerSelectUIResponse & response
)
Completa los valores de un TurnBasedMultiplayerManager::ShowPlayerSelectUIResponse
.
Ten en cuenta que esto no propaga la variante ni la máscara de bits exclusiva.
SetExclusiveBitMask
Builder & SetExclusiveBitMask(
uint64_t exclusive_bit_mask
)
Es una máscara de bits que indica roles exclusivos para los jugadores.
(p.ej., si un jugador es el atacante, el otro debe ser el defensor). Para que la coincidencia automática se realice correctamente, el producto lógico (AND) de la máscara de bits de cualquier jugador de vinculación debe ser igual a cero. La configuración predeterminada es 0.
SetMaximumAutomatchingPlayers
Builder & SetMaximumAutomatchingPlayers(
uint32_t maximum_automatching_players
)
Es la cantidad máxima de jugadores con coincidencia automática que pueden unirse a la partida.
Si no se especifica, el valor predeterminado es igual a la cantidad mínima de jugadores de coincidencia automática.
SetMinimumAutomatchingPlayers
Builder & SetMinimumAutomatchingPlayers(
uint32_t minimum_automatching_players
)
Es la cantidad mínima de jugadores con coincidencia automática que pueden unirse a la partida.
Si no se especifica, el valor predeterminado es 0. Se debe agregar al menos un reproductor o un ID de reproductor de coincidencia automática.
SetVariant
Builder & SetVariant(
uint32_t variant
)
Es un valor específico del desarrollador que se usa para indicar el tipo o el modo de coincidencia.
Solo los jugadores que usan la misma variante pueden realizar la coincidencia automática. El valor predeterminado es -1 cuando no se especifica.
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-27 (UTC)"],[],[],null,["# gpg::TurnBasedMatchConfig::Builder Class Reference\n\ngpg::TurnBasedMatchConfig::Builder\n==================================\n\n`#include \u003cturn_based_match_config_builder.h\u003e`\n\nBuilds one or more [TurnBasedMatchConfig](/games/services/cpp/api/class/gpg/turn-based-match-config#classgpg_1_1_turn_based_match_config) objects.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Builder](#classgpg_1_1_turn_based_match_config_1_1_builder_1affc108da6d6df5b6b93a430eb1cdce62)`()` ||\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AddAllPlayersToInvite](#classgpg_1_1_turn_based_match_config_1_1_builder_1a1cc8b2b8ed3c4f61c73693a2deb3d5b8)`(const std::vector\u003c std::string \u003e & player_ids)` | [Builder](/games/services/cpp/api/class/gpg/turn-based-match-config/builder#classgpg_1_1_turn_based_match_config_1_1_builder)` &` Adds multiple players to the list of players to invite to the match. |\n| [AddPlayerToInvite](#classgpg_1_1_turn_based_match_config_1_1_builder_1af1d5ed0388dd5b7ad55981ba2cd9bba8)`(const std::string & player_id)` | [Builder](/games/services/cpp/api/class/gpg/turn-based-match-config/builder#classgpg_1_1_turn_based_match_config_1_1_builder)` &` Adds a player to the list of players to invite to the match. |\n| [Create](#classgpg_1_1_turn_based_match_config_1_1_builder_1af2aee232c43b6812e1698009623e5e0d)`() const ` | [TurnBasedMatchConfig](/games/services/cpp/api/class/gpg/turn-based-match-config#classgpg_1_1_turn_based_match_config) Creates a [TurnBasedMatchConfig](/games/services/cpp/api/class/gpg/turn-based-match-config#classgpg_1_1_turn_based_match_config) object. |\n| [PopulateFromPlayerSelectUIResponse](#classgpg_1_1_turn_based_match_config_1_1_builder_1a536f6294640adcece2ffe2fda600bdf7)`(const `[TurnBasedMultiplayerManager::PlayerSelectUIResponse](/games/services/cpp/api/struct/gpg/turn-based-multiplayer-manager/player-select-u-i-response#structgpg_1_1_turn_based_multiplayer_manager_1_1_player_select_u_i_response)` & response)` | [Builder](/games/services/cpp/api/class/gpg/turn-based-match-config/builder#classgpg_1_1_turn_based_match_config_1_1_builder)` &` Populates values from a `TurnBasedMultiplayerManager::ShowPlayerSelectUIResponse`. |\n| [SetExclusiveBitMask](#classgpg_1_1_turn_based_match_config_1_1_builder_1adda30366347a5880b899bebfc1ef3ef5)`(uint64_t exclusive_bit_mask)` | [Builder](/games/services/cpp/api/class/gpg/turn-based-match-config/builder#classgpg_1_1_turn_based_match_config_1_1_builder)` &` A bit mask indicating exclusive roles for players. |\n| [SetMaximumAutomatchingPlayers](#classgpg_1_1_turn_based_match_config_1_1_builder_1a9e43ded51cea29a4c75e0558d261e9b5)`(uint32_t maximum_automatching_players)` | [Builder](/games/services/cpp/api/class/gpg/turn-based-match-config/builder#classgpg_1_1_turn_based_match_config_1_1_builder)` &` The maximum number of auto-matched players who can join the match. |\n| [SetMinimumAutomatchingPlayers](#classgpg_1_1_turn_based_match_config_1_1_builder_1ad78accb39872ad02d911f4a0ff274553)`(uint32_t minimum_automatching_players)` | [Builder](/games/services/cpp/api/class/gpg/turn-based-match-config/builder#classgpg_1_1_turn_based_match_config_1_1_builder)` &` The minimum number of auto-matched players who can join the match. |\n| [SetVariant](#classgpg_1_1_turn_based_match_config_1_1_builder_1a16a8d9b77b16c3dc7bb723e4f5048987)`(uint32_t variant)` | [Builder](/games/services/cpp/api/class/gpg/turn-based-match-config/builder#classgpg_1_1_turn_based_match_config_1_1_builder)` &` A developer-specific value used to indicate match type or mode. |\n\nPublic functions\n----------------\n\n### AddAllPlayersToInvite\n\n```c++\nBuilder & AddAllPlayersToInvite(\n const std::vector\u003c std::string \u003e & player_ids\n)\n``` \nAdds multiple players to the list of players to invite to the match.\n\nBy default, no players are added. \n\n### AddPlayerToInvite\n\n```c++\nBuilder & AddPlayerToInvite(\n const std::string & player_id\n)\n``` \nAdds a player to the list of players to invite to the match.\n\nBy default, no players are added to the match. The builder cannot create a match until players are added. \n\n### Builder\n\n```c++\n Builder()\n``` \n\n### Create\n\n```c++\nTurnBasedMatchConfig Create() const \n``` \nCreates a [TurnBasedMatchConfig](/games/services/cpp/api/class/gpg/turn-based-match-config#classgpg_1_1_turn_based_match_config) object. \n\n### PopulateFromPlayerSelectUIResponse\n\n```c++\nBuilder & PopulateFromPlayerSelectUIResponse(\n const TurnBasedMultiplayerManager::PlayerSelectUIResponse & response\n)\n``` \nPopulates values from a `TurnBasedMultiplayerManager::ShowPlayerSelectUIResponse`.\n\nNote that this does not populate the variant or the exclusive bit mask. \n\n### SetExclusiveBitMask\n\n```c++\nBuilder & SetExclusiveBitMask(\n uint64_t exclusive_bit_mask\n)\n``` \nA bit mask indicating exclusive roles for players.\n\n(E.g. For example, if one player is the attacker, the other must be the defender.) Successful auto-matching requires that the logical product (AND) of the bit mask of any pairing players equals zero. Defaults to 0. \n\n### SetMaximumAutomatchingPlayers\n\n```c++\nBuilder & SetMaximumAutomatchingPlayers(\n uint32_t maximum_automatching_players\n)\n``` \nThe maximum number of auto-matched players who can join the match.\n\nLeft unspecified, defaults to a value equal to the minimum number of auto-matching players. \n\n### SetMinimumAutomatchingPlayers\n\n```c++\nBuilder & SetMinimumAutomatchingPlayers(\n uint32_t minimum_automatching_players\n)\n``` \nThe minimum number of auto-matched players who can join the match.\n\nDefaults to 0 when left unspecified. At least one auto-matching player or player id must be added. \n\n### SetVariant\n\n```c++\nBuilder & SetVariant(\n uint32_t variant\n)\n``` \nA developer-specific value used to indicate match type or mode.\n\nOnly players using the same variant can auto-match. Defaults to -1 when left unspecified."]]