gpg::TurnBasedMatchConfig

#include <turn_based_match_config.h>

包含创建 TurnBasedMatch 所需数据的数据结构。

摘要

构造函数和析构函数

TurnBasedMatchConfig(std::shared_ptr< const TurnBasedMatchConfigImpl > impl)
构造从 shared_ptrTurnBasedMatchConfigImplTurnBasedMatchConfig
TurnBasedMatchConfig()
TurnBasedMatchConfig(const TurnBasedMatchConfig & copy_from)
创建现有 TurnBasedMatchConfig 的副本。
TurnBasedMatchConfig(TurnBasedMatchConfig && move_from)
移动现有的 TurnBasedMatchConfig

公共函数

ExclusiveBitMask() const
int64_t
一个位掩码,表示玩家是游戏专有的专有角色,例如“攻击者”或“防御者”。
MaximumAutomatchingPlayers() const
uint32_t
可添加到对局的自动配对玩家的数量上限。
MinimumAutomatchingPlayers() const
uint32_t
可添加到对局的自动配对玩家人数下限。
PlayerIdsToInvite() const
const std::vector< std::string > &
要邀请加入新创建的对局的玩家 ID。
Valid() const
bool
如果此 TurnBasedMatchConfig 填充有数据,则返回 true。
Variant() const
uint32_t
开发者专有的值,用于表示匹配类型或模式。
operator=(const TurnBasedMatchConfig & copy_from)
通过从其他实例复制来分配此TurnBasedMatchConfig
operator=(TurnBasedMatchConfig && move_from)
通过将另一个对象移入TurnBasedMatchConfig来分配此对象。

gpg::TurnBasedMatchConfig::Builder

构建一个或多个 TurnBasedMatchConfig 对象。

公共函数

ExclusiveBitMask

int64_t ExclusiveBitMask() const 

一个位掩码,表示玩家是游戏专有的专有角色,例如“攻击者”或“防御者”。

任何配对玩家的逻辑乘积 (AND) 都必须等于零,才能进行自动匹配。仅当 Valid 返回 true 时才能调用。

MaximumAutomatchingPlayers

uint32_t MaximumAutomatchingPlayers() const 

可添加到对局的自动配对玩家的数量上限。

仅当 Valid 返回 true 时才能调用。

MinimumAutomatchingPlayers

uint32_t MinimumAutomatchingPlayers() const 

可添加到对局的自动配对玩家人数下限。

仅当 Valid 返回 true 时才能调用。

PlayerIdsToInvite

const std::vector< std::string > & PlayerIdsToInvite() const 

要邀请加入新创建的对局的玩家 ID。

仅当 Valid 返回 true 时才能调用。

TurnBasedMatchConfig

 TurnBasedMatchConfig(
  std::shared_ptr< const TurnBasedMatchConfigImpl > impl
)

构造从 shared_ptrTurnBasedMatchConfigImplTurnBasedMatchConfig

供 API 内部使用。

TurnBasedMatchConfig

 TurnBasedMatchConfig()

TurnBasedMatchConfig

 TurnBasedMatchConfig(
  const TurnBasedMatchConfig & copy_from
)

创建现有 TurnBasedMatchConfig 的副本。

TurnBasedMatchConfig

 TurnBasedMatchConfig(
  TurnBasedMatchConfig && move_from
)

移动现有的 TurnBasedMatchConfig

有效

bool Valid() const 

如果此 TurnBasedMatchConfig 填充有数据,则返回 true。

必须返回 true 才能使 TurnBasedMatchConfig 对象上的 getter 函数(PlayerIdsToInviteMinimumAutomatchingPlayers 等)可用。

变体

uint32_t Variant() const 

开发者专有的值,用于表示匹配类型或模式。

只有使用同一值的玩家可以匹配。仅当 Valid 返回 true 时才能调用。

运算符=

TurnBasedMatchConfig & operator=(
  const TurnBasedMatchConfig & copy_from
)

通过从其他实例复制来分配此TurnBasedMatchConfig

运算符=

TurnBasedMatchConfig & operator=(
  TurnBasedMatchConfig && move_from
)

通过将另一个对象移入TurnBasedMatchConfig来分配此对象。