gpg::TurnBasedMatchConfig
#include <turn_based_match_config.h>
包含创建 TurnBasedMatch
所需数据的结构。
摘要
构造函数和析构函数 |
|
---|---|
TurnBasedMatchConfig(std::shared_ptr< const TurnBasedMatchConfigImpl > impl)
|
|
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 复制来赋值此 TurnBasedMatchConfig 。 |
operator=(TurnBasedMatchConfig && move_from)
|
通过将另一个
TurnBasedMatchConfig 移入此 TurnBasedMatchConfig 来赋值。 |
类 |
|
---|---|
gpg:: |
构建一个或多个 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_ptr
到 TurnBasedMatchConfigImpl
构造 TurnBasedMatchConfig
。
供 API 内部使用。
TurnBasedMatchConfig
TurnBasedMatchConfig()
TurnBasedMatchConfig
TurnBasedMatchConfig( const TurnBasedMatchConfig & copy_from )
创建一个现有 TurnBasedMatchConfig
的副本。
TurnBasedMatchConfig
TurnBasedMatchConfig( TurnBasedMatchConfig && move_from )
移动一个现有 TurnBasedMatchConfig
。
Valid
bool Valid() const
如果此 TurnBasedMatchConfig
填充了数据,则返回 true。
对于 TurnBasedMatchConfig
对象上的 getter 函数(如 PlayerIdsToInvite
、MinimumAutomatchingPlayers
等)可供使用,必须返回 true。
operator=
TurnBasedMatchConfig & operator=( const TurnBasedMatchConfig & copy_from )
通过从另一个 TurnBasedMatchConfig
复制来赋值此 TurnBasedMatchConfig
。
operator=
TurnBasedMatchConfig & operator=( TurnBasedMatchConfig && move_from )
通过将另一个 TurnBasedMatchConfig
移入此 TurnBasedMatchConfig
来赋值。