gpg:: RealTimeRoomConfig:: Builder
#include <real_time_room_config_builder.h>
建構一或多個 RealTimeRoomConfig 物件。
摘要
建構函式和解構函式 |
|
---|---|
Builder()
|
公開函式 |
|
---|---|
AddAllPlayersToInvite(const std::vector< std::string > & player_ids)
|
Builder &
將多位玩家加入要邀請加入等候室的玩家清單。
|
AddPlayerToInvite(const std::string & player_id)
|
Builder &
將玩家加入要邀請加入遊戲室的玩家清單。
|
Create() const
|
建立
RealTimeRoomConfig 物件。 |
PopulateFromPlayerSelectUIResponse(const RealTimeMultiplayerManager::PlayerSelectUIResponse & response)
|
Builder &
|
SetExclusiveBitMask(uint64_t exclusive_bit_mask)
|
Builder &
用於表示玩家專屬角色的位元遮罩。
|
SetMaximumAutomatchingPlayers(uint32_t maximum_automatching_players)
|
Builder &
可以加入聊天室的自動配對玩家人數上限。
|
SetMinimumAutomatchingPlayers(uint32_t minimum_automatching_players)
|
Builder &
可以加入遊戲室的自動玩家人數下限。
|
SetVariant(uint32_t variant)
|
Builder &
開發人員專屬值,用來表示客房類型或模式。
|
公開函式
AddAllPlayersToInvite
Builder & AddAllPlayersToInvite( const std::vector< std::string > & player_ids )
將多位玩家加入要邀請加入等候室的玩家清單。
根據預設,系統不會新增任何玩家。
AddPlayerToInvite
Builder & AddPlayerToInvite( const std::string & player_id )
將玩家加入要邀請加入遊戲室的玩家清單。
根據預設,系統不會將任何玩家加入聊天室。您必須先新增玩家,建構工具才能建立房間。
Builder
Builder()
PopulateFromPlayerSelectUIResponse
Builder & PopulateFromPlayerSelectUIResponse( const RealTimeMultiplayerManager::PlayerSelectUIResponse & response )
填入 RealTimeMultiplayerManager::PlayerSelectUIResponse
方法取得的值。
請注意,系統不會填入變化版本或專屬位元遮罩。
SetExclusiveBitMask
Builder & SetExclusiveBitMask( uint64_t exclusive_bit_mask )
用於表示玩家專屬角色的位元遮罩。
(例如,一名玩家是攻擊者,另一人則是防守者)。配對玩家的位元遮罩的邏輯產品 (AND) 必須等於 0,才能自動配對成功。預設值為 0。
SetMaximumAutomatchingPlayers
Builder & SetMaximumAutomatchingPlayers( uint32_t maximum_automatching_players )
可以加入聊天室的自動配對玩家人數上限。
未指定,預設為等於自動配對玩家人數下限。
SetMinimumAutomatchingPlayers
Builder & SetMinimumAutomatchingPlayers( uint32_t minimum_automatching_players )
可以加入遊戲室的自動玩家人數下限。
未指定時,預設值為 0。必須新增至少一個自動配對的玩家或玩家 ID。
SetVariant
Builder & SetVariant( uint32_t variant )
開發人員專屬值,用來表示客房類型或模式。
只有使用相同變化版本的玩家可以自動配對。如未指定,預設為 -1。