gpg::
  #include <multiplayer_participant.h>
  包含多人對戰遊戲中參與者相關資料的資料結構。
摘要
| 建構函式和解構函式 | |
|---|---|
| MultiplayerParticipant() | |
| MultiplayerParticipant(std::shared_ptr< const MultiplayerParticipantImpl > impl) | |
| MultiplayerParticipant(const MultiplayerParticipant & copy_from)建立現有「 MultiplayerParticipant」的副本。 | |
| MultiplayerParticipant(MultiplayerParticipant && move_from)移動現有的  MultiplayerParticipant。 | |
| ~MultiplayerParticipant() | 
| 公開函式 | |
|---|---|
| AvatarUrl(ImageResolution resolution) const  | const std::string &傳回此  MultiplayerParticipant顯示圖片的所在網址。 | 
| DisplayName() const  | const std::string &這個  MultiplayerParticipant的顯示名稱。 | 
| HasMatchResult() const  | bool此參與者是否擁有這場對戰的結果。 | 
| HasPlayer() const  | bool指出 Player 是否與此  MultiplayerParticipant相關聯。 | 
| Id() const  | const std::string &此 MultiplayerParticipant的Id。 | 
| IsConnectedToRoom() const  | bool此參與者是否已連線至  RealTimeRoom。 | 
| MatchRank() const  | uint32_t這個  MultiplayerParticipant在相符項目中的排名。 | 
| MatchResult() const  | 這個  MultiplayerParticipant的相符結果。 | 
| Player() const  | 與此  MultiplayerParticipant相關聯的 Player。 | 
| Status() const  | 此  MultiplayerParticipant與比對相關的狀態。 | 
| Valid() const  | bool如果這個  MultiplayerParticipant填入資料,則傳回 true。 | 
| operator=(const MultiplayerParticipant & copy_from) | 透過複製另一個項目來指派此 MultiplayerParticipant。 | 
| operator=(MultiplayerParticipant && move_from) | 透過移動另一個項目來指派 MultiplayerParticipant。 | 
公開函式
AvatarUrl
const std::string & AvatarUrl( ImageResolution resolution ) const
傳回此 MultiplayerParticipant 顯示圖片的所在網址。
ImageResolution 參數會指定傳回圖片的解析度。請指定 ICON 或 HI_RES 解析度。Valid 必須傳回 true,這個函式才能使用。
DisplayName
const std::string & DisplayName() const
這個 MultiplayerParticipant 的顯示名稱。
Valid 必須傳回 true,這個函式才能使用。
HasMatchResult
bool HasMatchResult() const
此參與者是否擁有這場對戰的結果。
如果值為 false,MatchResult 和 MatchRank 不會傳回有效的資料。Valid 必須傳回 true,這個函式才能使用。
HasPlayer
bool HasPlayer() const
指出 Player 是否與此 MultiplayerParticipant 相關聯。
Valid 必須傳回 true,這個函式才能使用。
ID
const std::string & Id() const
此MultiplayerParticipant的 Id。
Id 只在單一相符項目的範圍中有效,而且與 Player::Id() 不同。Valid 必須傳回 true,這個函式才能使用。
IsConnectedToRoom
bool IsConnectedToRoom() const
此參與者是否已連線至 RealTimeRoom。
如果這是 TurnBasedMatch 的參與者,則一律為 false。
MatchRank
uint32_t MatchRank() const
這個 MultiplayerParticipant 在相符項目中的排名。
Valid 必須傳回 true,這個函式才能使用。如果 HasMatchResult() 未傳回 true,此函式會傳回 0。
MatchResult
gpg::MatchResult MatchResult() const
這個 MultiplayerParticipant 的相符結果。
Valid 必須傳回 true,這個函式才能使用。如果 HasMatchResult() 未傳回 true,這個函式會傳回 MatchResult::None。
MultiplayerParticipant
MultiplayerParticipant()
MultiplayerParticipant
MultiplayerParticipant( std::shared_ptr< const MultiplayerParticipantImpl > impl )
從 shared_ptr 建構 MultiplayerParticipant 至 MultiplayerParticipantImpl。
適用於 API 的內部使用。
MultiplayerParticipant
MultiplayerParticipant( const MultiplayerParticipant & copy_from )
建立現有「MultiplayerParticipant」的副本。
MultiplayerParticipant
MultiplayerParticipant( MultiplayerParticipant && move_from )
移動現有的 MultiplayerParticipant。
有效
bool Valid() const
如果這個 MultiplayerParticipant 填入資料,則傳回 true。
這個值必須為 true,才能使用這個 MultiplayerParticipant 的 getter 函式 (DisplayName、AvatarUrl、Id 等)。
operator=
MultiplayerParticipant & operator=( const MultiplayerParticipant & copy_from )
透過複製另一個項目來指派此MultiplayerParticipant。
operator=
MultiplayerParticipant & operator=( MultiplayerParticipant && move_from )
透過移動另一個項目來指派MultiplayerParticipant。
約多人對戰遊戲
~MultiplayerParticipant()
