Platforms to show: All Mac Windows Linux Cross-Platform

GKTurnBasedParticipantMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A GKTurnBasedParticipant object stores information for a participant in a turn-based match.

Your game never creates objects of this class directly; instead it retrieves an array of GKTurnBasedParticipant objects from an GKTurnBasedMatch object.

Most information stored by a GKTurnBasedParticipant object is read-only, and is provided by Game Kit to assist you in implementing your game logic. However, the matchOutcome property is quite important; before your game may end a match, it must set the matchOutcome property in every GKTurnBasedParticipant object associated with the match.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Constants

Constant Value Description
GKTurnBasedMatchOutcomeCustomRange &h00FF0000 One of the states the participant was in when they left the match. A mask used to allow your game to provide its own custom outcome. Any custom value must fit inside the mask.
GKTurnBasedMatchOutcomeFirst 6 One of the states the participant was in when they left the match. The participant finished first.
GKTurnBasedMatchOutcomeFourth 9 One of the states the participant was in when they left the match. The participant finished fourth.
GKTurnBasedMatchOutcomeLost 3 One of the states the participant was in when they left the match. The participant lost the match.
GKTurnBasedMatchOutcomeNone 0 One of the states the participant was in when they left the match. The participant's outcome has not been set yet (typically because the match is still in progress).
GKTurnBasedMatchOutcomeQuit 1 One of the states the participant was in when they left the match. The participant forfeited the match.
GKTurnBasedMatchOutcomeSecond 7 One of the states the participant was in when they left the match. The participant finished second.
GKTurnBasedMatchOutcomeThird 8 One of the states the participant was in when they left the match. The participant finished third.
GKTurnBasedMatchOutcomeTied 4 One of the states the participant was in when they left the match. The participant tied the match.
GKTurnBasedMatchOutcomeTimeExpired 5 One of the states the participant was in when they left the match. The participant was ejected from the match because he or she did not act in a timely fashion.
GKTurnBasedMatchOutcomeWon 2 One of the states the participant was in when they left the match. The participant won the match.
GKTurnBasedParticipantStatusActive 4 One of the states the participant is in during the match. The participant has joined the match and is an active player in it.
GKTurnBasedParticipantStatusDeclined 2 One of the states the participant is in during the match. The participant declined the invitation to join the match. When any participant declines an invitation to join a match, the match is automatically terminated.
GKTurnBasedParticipantStatusDone 5 One of the states the participant is in during the match. The participant has exited the match. Your game sets the matchOutcome property to state why the participant left the match.
GKTurnBasedParticipantStatusInvited 1 One of the states the participant is in during the match. The participant was invited to the match, but has not responded to the invitation.
GKTurnBasedParticipantStatusMatching 3 One of the states the participant is in during the match. The participant is an unfilled position in the match that Game Center promises to fill when needed. When your game sets this participant as the current participant in the match, Game Center fills the position and updates the status and playerID properties.
GKTurnBasedParticipantStatusUnknown 0 One of the states the participant is in during the match. The participant is in an unexpected state.

This class has no sub classes.

Some methods using this class:

Some events using this class:

Blog Entries

Xojo Developer Magazine


The items on this page are in the following plugins: MBS MacFrameworks Plugin.


GKTurnBasedMatchMBS   -   GKVoiceChatMBS


The biggest plugin in space...