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
        是否有玩家与此  
      MultiplayerParticipant 相关联。 | 
    
        Id() const 
       | 
      
        const std::string &
        此  
      MultiplayerParticipant 的 Id。 | 
    
        IsConnectedToRoom() const 
       | 
      
        bool
        此参与者是否已连接到  
      RealTimeRoom。 | 
    
        MatchRank() const 
       | 
      
        uint32_t
        此  
      MultiplayerParticipant 在匹配中的排名。 | 
    
        MatchResult() const 
       | 
      
        
         此  
      MultiplayerParticipant 的匹配结果。 | 
    
        Player() const 
       | 
      
        
         与此  
      MultiplayerParticipant 关联的播放器。 | 
    
        Status() const 
       | 
      
        
         此  
      MultiplayerParticipant 相对于匹配的状态。 | 
    
        Valid() const 
       | 
      
        bool
        如果此  
      MultiplayerParticipant 已填充数据,则返回 true。 | 
    
        operator=(const MultiplayerParticipant & copy_from)
       | 
      
        
         通过从其他  
      MultiplayerParticipant 复制来分配此 MultiplayerParticipant。 | 
    
        operator=(MultiplayerParticipant && move_from)
       | 
      
        
         通过将另一个  
      MultiplayerParticipant 移入其中来分配此 MultiplayerParticipant。 | 
    
公共函数
AvatarUrl
const std::string & AvatarUrl( ImageResolution resolution ) const
返回此 MultiplayerParticipant 头像图片所在的网址。
ImageResolution 参数指定返回图片的分辨率。为分辨率指定 ICON 或 HI_RES。有效必须返回 true,此函数才能使用。
DisplayName
const std::string & DisplayName() const
此 MultiplayerParticipant 的显示名称。
有效必须返回 true,此函数才能使用。
HasMatchResult
bool HasMatchResult() const
此参与者是否有此匹配的结果。
如果为 false,MatchResult 和 MatchRank 不会返回有效数据。有效必须返回 true,此函数才能使用。
ID
const std::string & Id() const
此 MultiplayerParticipant 的 Id。
Id 仅在单个匹配范围内有效,与 Player::Id() 不同。有效必须返回 true,此函数才能使用。
IsConnectedToRoom
bool IsConnectedToRoom() const
此参与者是否已连接到 RealTimeRoom。
如果是 TurnBasedMatch 中的参与者,则始终为 false。
MatchRank
uint32_t MatchRank() const
此 MultiplayerParticipant 在匹配中的排名。
有效必须返回 true,此函数才能使用。如果 HasMatchResult() 未返回 true,此函数会返回 0。
MatchResult
gpg::MatchResult MatchResult() const
此 MultiplayerParticipant 的匹配结果。
有效必须返回 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 等)。
operator=
MultiplayerParticipant & operator=( const MultiplayerParticipant & copy_from )
通过从其他 MultiplayerParticipant 复制来分配此 MultiplayerParticipant。
operator=
MultiplayerParticipant & operator=( MultiplayerParticipant && move_from )
通过将另一个 MultiplayerParticipant 移入其中来分配此 MultiplayerParticipant。
~MultiplayerParticipant
~MultiplayerParticipant()