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 &
แสดงผล URL ที่มีรูปภาพรูปโปรไฟล์ของ
MultiplayerParticipant นี้ |
DisplayName() const
|
const std::string &
ชื่อที่แสดงสำหรับ
MultiplayerParticipant นี้ |
HasMatchResult() const
|
bool
ผู้เข้าร่วมรายนี้มีผลการแข่งขันนี้หรือไม่
|
HasPlayer() const
|
bool
โปรแกรมเล่นเชื่อมโยงกับ
MultiplayerParticipant นี้หรือไม่ |
Id() const
|
const std::string &
Id ของ MultiplayerParticipant นี้ |
IsConnectedToRoom() const
|
bool
ผู้เข้าร่วมรายนี้เชื่อมต่อกับ
RealTimeRoom หรือไม่ |
MatchRank() const
|
uint32_t
อันดับสำหรับ
MultiplayerParticipant นี้ภายในการจับคู่ |
MatchResult() const
|
ผลการแข่งขันสำหรับ
MultiplayerParticipant นี้ |
Player() const
|
โปรแกรมเล่นที่เชื่อมโยงกับ
MultiplayerParticipant นี้ |
Status() const
|
สถานะของ
MultiplayerParticipant นี้ที่เกี่ยวข้องกับการจับคู่ |
Valid() const
|
bool
แสดงค่า "จริง" หากมีการเติมข้อมูล
MultiplayerParticipant นี้ |
operator=(const MultiplayerParticipant & copy_from)
|
มอบหมาย
MultiplayerParticipant นี้โดยคัดลอกจากบุคคลอื่น |
operator=(MultiplayerParticipant && move_from)
|
มอบหมาย
MultiplayerParticipant เครื่องนี้โดยย้ายอีกโฟลเดอร์หนึ่งไปไว้ในนั้น |
ฟังก์ชันสาธารณะ
AvatarUrl
const std::string & AvatarUrl( ImageResolution resolution ) const
แสดงผล URL ที่มีรูปภาพรูปโปรไฟล์ของ MultiplayerParticipant
นี้
พารามิเตอร์ ImageResolution
ระบุความละเอียดของรูปภาพที่แสดง ระบุ ICON หรือ HI_RES สำหรับความละเอียด ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้
DisplayName
const std::string & DisplayName() const
ชื่อที่แสดงสำหรับ MultiplayerParticipant
นี้
ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้
HasMatchResult
bool HasMatchResult() const
ผู้เข้าร่วมรายนี้มีผลการแข่งขันนี้หรือไม่
หากเป็น "เท็จ" MatchResult และ MatchRank จะไม่แสดงข้อมูลที่ถูกต้อง ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้
HasPlayer
bool HasPlayer() const
โปรแกรมเล่นเชื่อมโยงกับ MultiplayerParticipant
นี้หรือไม่
ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้
รหัส
const std::string & Id() const
Id
ของ MultiplayerParticipant
นี้
Id
ใช้ได้ในขอบเขตของการจับคู่ที่ตรงกันเพียงครั้งเดียวเท่านั้น และแตกต่างจากของ Player::Id()
ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้
IsConnectedToRoom
bool IsConnectedToRoom() const
ผู้เข้าร่วมรายนี้เชื่อมต่อกับ RealTimeRoom
หรือไม่
เป็นเท็จเสมอหากเป็นผู้เข้าร่วมจาก TurnBasedMatch
MatchRank
uint32_t MatchRank() const
อันดับสำหรับ MultiplayerParticipant
นี้ภายในการจับคู่
ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้ หาก HasMatchResult()
ไม่แสดงผลเป็น "จริง" ฟังก์ชันนี้จะแสดงผลเป็น 0
MatchResult
gpg::MatchResult MatchResult() const
ผลการแข่งขันสำหรับ MultiplayerParticipant
นี้
ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้ หาก HasMatchResult()
ไม่แสดงผลเป็น "จริง" ฟังก์ชันนี้จะแสดงผล MatchResult::None
MultiplayerParticipant
MultiplayerParticipant()
MultiplayerParticipant
MultiplayerParticipant( std::shared_ptr< const MultiplayerParticipantImpl > impl )
สร้าง MultiplayerParticipant
จาก shared_ptr
เป็น MultiplayerParticipantImpl
มีไว้สำหรับใช้ภายในโดย API
MultiplayerParticipant
MultiplayerParticipant( const MultiplayerParticipant & copy_from )
สร้างสำเนาของ MultiplayerParticipant
ที่มีอยู่
MultiplayerParticipant
MultiplayerParticipant( MultiplayerParticipant && move_from )
ย้าย MultiplayerParticipant
ที่มีอยู่
ผู้เล่น
gpg::Player Player() const
โปรแกรมเล่นที่เชื่อมโยงกับ MultiplayerParticipant
นี้
ทั้ง Valid และ HasPlayer ต้องคืนค่าเป็น true (จริง) เพื่อให้ฟังก์ชันนี้ใช้งานได้
สถานะ
ParticipantStatus Status() const
สถานะของ MultiplayerParticipant
นี้ที่เกี่ยวข้องกับการจับคู่
ฟังก์ชันใช้งานได้จะต้องคืนค่า "จริง" เพื่อให้ฟังก์ชันนี้ใช้งานได้
ใช้งานได้
bool Valid() const
แสดงค่า "จริง" หากมีการเติมข้อมูล MultiplayerParticipant
นี้
ต้องเป็นจริงเพื่อให้ฟังก์ชัน Getter (DisplayName
, AvatarUrl
, Id
เป็นต้น) ใน MultiplayerParticipant
นี้ใช้งานได้
โอเปอเรเตอร์=
MultiplayerParticipant & operator=( const MultiplayerParticipant & copy_from )
มอบหมาย MultiplayerParticipant
นี้โดยคัดลอกจากบุคคลอื่น
โอเปอเรเตอร์=
MultiplayerParticipant & operator=( MultiplayerParticipant && move_from )
มอบหมาย MultiplayerParticipant
เครื่องนี้โดยย้ายอีกโฟลเดอร์หนึ่งไปไว้ในนั้น
~ผู้เข้าร่วมแบบผู้เล่นหลายคน
~MultiplayerParticipant()