GCKGameManagerState Class

GCKGameManagerState Class Reference

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) 
Returns the GCKPlayerInfo for the specified player ID or nil if the player does not exist. More...
(NSArray< GCKPlayerInfo * > *) 
Returns a list of players that are in the specified player state. More...
Returns whether the lobby state is different between this object and the specified game manager state. More...
Returns whether the gameplay state is different between this object and the specified game manager state. More...
(BOOL) 
Returns whether the game data is different between this object and the specified game manager state. More...
Returns whether game status text is different between this object and the specified game manager state. More...
Returns whether the player with the specified player ID has changed between this object and the specified game manager state. More...
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...
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 * > *) 
Returns a list of player IDs that are different between this object and the specified game manager state. More...

Property Summary

The lobby state. More...
The gameplay state. More...
id 
The game specific data. More...
NSString * 
The game status text. More...
NSArray< GCKPlayerInfo * > * 
The list of all players in the game. More...
The list of all the players created by this sender device. More...
NSArray< GCKPlayerInfo * > * 
The list of players in a connected state. More...
The list of players in a connected state that were also created on this sender device. More...
NSString * 
The application name. More...
NSInteger 
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

- ( GCKLobbyState ) lobbyState
read nonatomic assign

The lobby state.

See GCKLobbyState for valid values.

- ( GCKGameplayState ) gameplayState
read nonatomic assign

The gameplay state.

See GCKGameplayState for valid values.

- (id) gameData
read nonatomic copy

The game specific data.

Will be either an object that can be serialized to JSON using NSJSONSerialization, or nil .

- (NSString*) gameStatusText
read nonatomic copy

The game status text.

- (NSArray< GCKPlayerInfo *>*) players
read nonatomic strong

The list of all players in the game.

- (NSArray< GCKPlayerInfo *>*) controllablePlayers
read nonatomic assign

The list of all the players created by this sender device.

- (NSArray< GCKPlayerInfo *>*) connectedPlayers
read nonatomic strong

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 .

- (NSArray< GCKPlayerInfo *>*) connectedControllablePlayers
read nonatomic strong

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 .

- (NSString*) applicationName
read nonatomic copy

The application name.

Returns nil if the GCKGameManagerChannel is not yet connected to the receiver's Game Manager.

- (NSInteger) maxPlayers
read nonatomic assign

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.

Create a Mobile Website
View Site in Mobile | Classic
Share by: