Class TurnBasedMatch
Represents a turn-based match.
Inheritance
Namespace: EasyMobile
Assembly: cs.temp.dll.dll
Syntax
public class TurnBasedMatch
Constructors
TurnBasedMatch(String, Int32, Byte[], String, Participant[], String, TurnBasedMatch.MatchStatus)
Declaration
protected TurnBasedMatch(string matchId, int playerCount, byte[] data, string selfParticipantId, Participant[] participants, string currentParticipantId, TurnBasedMatch.MatchStatus matchStatus)
Parameters
Type | Name | Description |
---|---|---|
System.String | matchId | |
System.Int32 | playerCount | |
System.Byte[] | data | |
System.String | selfParticipantId | |
Participant[] | participants | |
System.String | currentParticipantId | |
TurnBasedMatch.MatchStatus | matchStatus |
Properties
CurrentParticipant
The participant who holds the current turn.
Declaration
public Participant CurrentParticipant { get; }
Property Value
Type | Description |
---|---|
Participant | The current participant. |
CurrentParticipantId
The ID of the participant who holds the current turn.
Declaration
public string CurrentParticipantId { get; }
Property Value
Type | Description |
---|---|
System.String | The current participant identifier. |
Data
The data associated with the match. The meaning of this data is defined by the game.
When the match has just been created, this value is null
.
Declaration
public byte[] Data { get; }
Property Value
Type | Description |
---|---|
System.Byte[] | The data. |
HasVacantSlot
Returns true
if this match has at least one slot to be filled by a participant.
Declaration
public bool HasVacantSlot { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsMyTurn
Returns true if the current turn belongs to the local player.
Declaration
public bool IsMyTurn { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MatchId
The match identifier.
Declaration
public string MatchId { get; }
Property Value
Type | Description |
---|---|
System.String | The match identifier. |
Participants
The participants of the match, i.e. the players who actually joined the match (on Google Play Games platform, this also includes the players who are invited but haven't joined the match yet). It doesn't include participants who are being auto-matched (whom will be added when they actually joined the match).
Declaration
public Participant[] Participants { get; }
Property Value
Type | Description |
---|---|
Participant[] | The participants. |
PlayerCount
The total number of players required for this match.
Declaration
public int PlayerCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The player count. |
Self
The participant that represents the local player in the match.
Declaration
public Participant Self { get; }
Property Value
Type | Description |
---|---|
Participant | The self. |
SelfParticipantId
The ID of the participant that represents the local player.
Declaration
public string SelfParticipantId { get; }
Property Value
Type | Description |
---|---|
System.String | The self participant identifier. |
Status
The match status.
Declaration
public TurnBasedMatch.MatchStatus Status { get; }
Property Value
Type | Description |
---|---|
TurnBasedMatch.MatchStatus | The status. |
Methods
GetParticipant(String)
Gets a participant by ID. Returns null if not found.
Declaration
public Participant GetParticipant(string participantId)
Parameters
Type | Name | Description |
---|---|---|
System.String | participantId | Participant identifier. |
Returns
Type | Description |
---|---|
Participant | The participant. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |