Class Participant
Represents a participant in a real-time or turn-based multiplayer match. A Participant
is different from a Player! A Player is a real-world person with a name
and a Player ID. A Participant is an entity that participates in a real-time
or turn-based match; it may be tied to a Player or not. For example, on Game Center a Participant
is not associated with any Player if the player hasn't actually joined the match; on Google Play Games
Participants without Players represent the anonymous participants in an automatch game.
Inheritance
System.Object
Participant
Assembly: cs.temp.dll.dll
Syntax
public class Participant : IComparable<Participant>
Constructors
Participant(String, String, Participant.ParticipantStatus, Player, Boolean)
Declaration
protected Participant(string displayName, string participantId, Participant.ParticipantStatus status, Player player, bool connectedToRoom)
Parameters
Properties
DisplayName
Declaration
public string DisplayName { get; }
Property Value
Type |
Description |
System.String |
The display name.
|
IsConnectedToRoom
Returns whether the participant is connected to the real-time room. This has no
meaning in turn-based matches.
Declaration
public bool IsConnectedToRoom { get; }
Property Value
Type |
Description |
System.Boolean |
|
ParticipantId
Gets the participant identifier. Important: everyone in a particular match
agrees on what is the participant ID for each participant; however, participant
IDs are not meaningful outside of the particular match where they are used.
If the same user plays two subsequent matches, their Participant Id will likely
be different in the two matches.
Declaration
public string ParticipantId { get; }
Property Value
Type |
Description |
System.String |
The participant identifier.
|
Player
Gets the player that corresponds to this participant. On Google Play Games
platform, this will be null if this is an anonymous (automatch) participant.
Declaration
public Player Player { get; }
Property Value
Type |
Description |
Player |
The player, or null if this is an anonymous participant.
|
Status
Gets the participant's status.
Declaration
public Participant.ParticipantStatus Status { get; }
Property Value
Methods
CompareTo(Participant)
Declaration
public int CompareTo(Participant other)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Equals(Participant)
Declaration
public bool Equals(Participant obj)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()