Overview
A representation of the state of the Game Manager running on the receiver device.
- Deprecated:
- The Game Manager API is no longer supported and will be removed in a future release.
Inherits NSObject.
Instance Method Summary | |
(GCKPlayerInfo *__nullable) | - getPlayer: |
Returns the GCKPlayerInfo for the specified player ID or nil if the player does not exist. More... | |
(NSArray< GCKPlayerInfo * > *) | - getPlayersInState: |
Returns a list of players that are in the specified player state. More... | |
(BOOL) | - hasLobbyStateChanged: |
Returns whether the lobby state is different between this object and the specified game manager state. More... | |
(BOOL) | - hasGameplayStateChanged: |
Returns whether the gameplay state is different between this object and the specified game manager state. More... | |
(BOOL) | - hasGameDataChanged: |
Returns whether the game data is different between this object and the specified game manager state. More... | |
(BOOL) | - hasGameStatusTextChanged: |
Returns whether game status text is different between this object and the specified game manager state. More... | |
(BOOL) | - hasPlayerChanged:otherState: |
Returns whether the player with the specified player ID has changed between this object and the specified game manager state. More... | |
(BOOL) | - hasPlayerStateChanged:otherState: |
Returns whether the player state of the player with the specified player ID has changed between this object and the specified game manager state. More... | |
(BOOL) | - hasPlayerDataChanged:otherState: |
Returns whether the player data of the player with the specified player ID has changed between this object and the specified game manager state. More... | |
(NSArray< NSString * > *) | - getListOfChangedPlayers: |
Returns a list of player IDs that are different between this object and the specified game manager state. More... | |
Property Summary | |
GCKLobbyState | lobbyState |
The lobby state. More... | |
GCKGameplayState | gameplayState |
The gameplay state. More... | |
id | gameData |
The game specific data. More... | |
NSString * | gameStatusText |
The game status text. More... | |
NSArray< GCKPlayerInfo * > * | players |
The list of all players in the game. More... | |
NSArray< GCKPlayerInfo * > * | controllablePlayers |
The list of all the players created by this sender device. More... | |
NSArray< GCKPlayerInfo * > * | connectedPlayers |
The list of players in a connected state. More... | |
NSArray< GCKPlayerInfo * > * | connectedControllablePlayers |
The list of players in a connected state that were also created on this sender device. More... | |
NSString * | applicationName |
The application name. More... | |
NSInteger | maxPlayers |
The maximum number of players as defined by the receiver. More... | |
Method Detail
- (GCKPlayerInfo *__nullable) getPlayer: | (NSString *) | playerID |
Returns the GCKPlayerInfo for the specified player ID or nil
if the player does not exist.
- Parameters
-
playerID The player ID.
- (NSArray<GCKPlayerInfo *> *) getPlayersInState: | (GCKPlayerState) | playerState |
Returns a list of players that are in the specified player state.
- Parameters
-
playerState The player state.
- (BOOL) hasLobbyStateChanged: | (GCKGameManagerState *) | otherState |
Returns whether the lobby state is different between this object and the specified game manager state.
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasGameplayStateChanged: | (GCKGameManagerState *) | otherState |
Returns whether the gameplay state is different between this object and the specified game manager state.
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasGameDataChanged: | (GCKGameManagerState *) | otherState |
Returns whether the game data is different between this object and the specified game manager state.
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasGameStatusTextChanged: | (GCKGameManagerState *) | otherState |
Returns whether game status text is different between this object and the specified game manager state.
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasPlayerChanged: | (NSString *) | playerId | |
otherState: | (GCKGameManagerState *) | otherState | |
Returns whether the player with the specified player ID has changed between this object and the specified game manager state.
- Parameters
-
playerId The player ID. otherState The game manager state to compare to.
- (BOOL) hasPlayerStateChanged: | (NSString *) | playerId | |
otherState: | (GCKGameManagerState *) | otherState | |
Returns whether the player state of the player with the specified player ID has changed between this object and the specified game manager state.
- Parameters
-
playerId The player ID. otherState The game manager state to compare to.
- (BOOL) hasPlayerDataChanged: | (NSString *) | playerId | |
otherState: | (GCKGameManagerState *) | otherState | |
Returns whether the player data of the player with the specified player ID has changed between this object and the specified game manager state.
- Parameters
-
playerId The player ID. otherState The game manager state to compare to.
- (NSArray<NSString *> *) getListOfChangedPlayers: | (GCKGameManagerState *) | otherState |
Returns a list of player IDs that are different between this object and the specified game manager state.
This includes players that were added, removed, or have changed in any way.
- Parameters
-
otherState The game manager state to compare to.
Property Detail
|
readnonatomicassign |
The lobby state.
See GCKLobbyState for valid values.
|
readnonatomicassign |
The gameplay state.
See GCKGameplayState for valid values.
|
readnonatomiccopy |
The game specific data.
Will be either an object that can be serialized to JSON using NSJSONSerialization, or nil
.
|
readnonatomiccopy |
The game status text.
|
readnonatomicstrong |
The list of all players in the game.
|
readnonatomicassign |
The list of all the players created by this sender device.
|
readnonatomicstrong |
The list of players in a connected state.
A player is considered to be in a connected state if the associated GCKPlayerInfo::playerState is one of GCKPlayerStateAvailable, GCKPlayerStateReady, GCKPlayerStateIdle, or GCKPlayerStatePlaying.
|
readnonatomicstrong |
The list of players in a connected state that were also created on this sender device.
A player is considered to be in a connected state if the associated GCKPlayerInfo::playerState is one of GCKPlayerStateAvailable, GCKPlayerStateReady, GCKPlayerStateIdle, or GCKPlayerStatePlaying.
|
readnonatomiccopy |
The application name.
Returns nil
if the GCKGameManagerChannel is not yet connected to the receiver's Game Manager.
|
readnonatomicassign |
The maximum number of players as defined by the receiver.
Returns 0 if the GCKGameManagerChannel is not yet connected to the receiver's Game Manager.