gpg:: MultiplayerParticipant
#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
到 MultiplayerParticipantImpl
的 MultiplayerParticipant
。
主要供 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
等)。
運算子=
MultiplayerParticipant & operator=( const MultiplayerParticipant & copy_from )
會從另一個 MultiplayerParticipant
中複製此 。
運算子=
MultiplayerParticipant & operator=( MultiplayerParticipant && move_from )
如要指派這個 MultiplayerParticipant
,請將其他項目移至該項目。
約多人對戰遊戲參與者
~MultiplayerParticipant()