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 |
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.
- 9 properties
- property Handle as Integer
- property lastTurnDate as date
- property lastTurnDateTime as DateTime
- property matchOutcome as Integer
- property player as GKPlayerMBS
- property playerID as string
- property status as Integer
- property timeoutDate as date
- property timeoutDateTime as DateTime
- method Constructor Private
- 17 constants
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:
- GKTurnBasedMatchMBS.currentParticipant as GKTurnBasedParticipantMBS
- GKTurnBasedMatchMBS.endTurnWithNextParticipant(nextParticipant as GKTurnBasedParticipantMBS, matchData as Dictionary, tag as Variant = nil)
- GKTurnBasedMatchMBS.endTurnWithNextParticipants(nextParticipants() as GKTurnBasedParticipantMBS, timeout as Double, matchData as Dictionary, tag as Variant = nil)
- GKTurnBasedMatchMBS.participantQuitInTurnWithOutcome(matchOutcome as Integer, nextParticipant as GKTurnBasedParticipantMBS, matchData as Dictionary, tag as Variant = nil)
- GKTurnBasedMatchMBS.participantQuitInTurnWithOutcome(matchOutcome as Integer, nextParticipants() as GKTurnBasedParticipantMBS, timeout as Double, matchData as Dictionary, tag as Variant = nil)
- GKTurnBasedMatchMBS.participants as GKTurnBasedParticipantMBS()
Some events using this class:
- GameKitMBS.endTurnWithNextParticipant(match as GKTurnBasedMatchMBS, nextParticipant as GKTurnBasedParticipantMBS, matchData as Dictionary, error as NSErrorMBS, tag as Variant)
- GameKitMBS.endTurnWithNextParticipantsCompleted(match as GKTurnBasedMatchMBS, nextParticipants() as GKTurnBasedParticipantMBS, timeout as Double, matchData as Dictionary, error as NSErrorMBS, tag as Variant)
- GameKitMBS.participantQuitInTurnWithOutcomeCompleted(match as GKTurnBasedMatchMBS, matchOutcome as Integer, nextParticipant as GKTurnBasedParticipantMBS, nextParticipants() as GKTurnBasedParticipantMBS, timeout as Double, matchData as Dictionary, error as NSErrorMBS, tag as Variant)
Blog Entries
Xojo Developer Magazine
- 12.6, pages 33 to 35: Writing OS X Apps for Game Center, Part 3: Turn-Based Games by Tom Baumgartner
- 12.6, page 29: Writing OS X Apps for Game Center, Part 3: Turn-Based Games by Tom Baumgartner
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
GKTurnBasedMatchMBS - GKVoiceChatMBS