GCKGameManagerState Class

GCKGameManagerState Class Reference

Overview

Represents a snapshot of the state of the Game Manager running on the receiver device.

Inherits NSObject.

Instance Method Summary

(GCKPlayerInfo *) - getPlayer:
 Returns the playerInfo for the specified playerID or null if the player does not exist. More...
 
(NSArray *) - 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 GCKGameManagerState. More...
 
(BOOL) - hasGameplayStateChanged:
 Returns whether the gameplay state is different between this object and the specified GCKGameManagerState. More...
 
(BOOL) - hasGameDataChanged:
 Returns whether the game data is different between this object and the specified GCKGameManagerState. More...
 
(BOOL) - hasGameStatusTextChanged:
 Returns whether game status text is different between this object and the specified GCKGameManagerState. More...
 
(BOOL) - hasPlayerChanged:otherState:
 Returns whether the player with the specified player ID has changed between this object and the specified GCKGameManagerState. 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 GCKGameManagerState. 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 GCKGameManagerState. More...
 
(NSArray *) - getListOfChangedPlayers:
 Returns a list of player IDs that are different between this object and the specified GCKGameManagerState. More...
 

Properties

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 * players
 The list of all players in the game. More...
 
NSArray * controllablePlayers
 The list of all the players created by this sender device. More...
 
NSArray * connectedPlayers
 The list of players in a connected state. More...
 
NSArray * 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 *) getPlayer: (NSString *)  playerID

Returns the playerInfo for the specified playerID or null if the player does not exist.

Parameters
playerIDThe id of the player.
- (NSArray *) getPlayersInState: (GCKPlayerState playerState

Returns a list of players that are in the specified player state.

Parameters
playerStateThe GCKPlayerState each player has to be in.
- (BOOL) hasLobbyStateChanged: (GCKGameManagerState *)  otherState

Returns whether the lobby state is different between this object and the specified GCKGameManagerState.

Parameters
otherState
- (BOOL) hasGameplayStateChanged: (GCKGameManagerState *)  otherState

Returns whether the gameplay state is different between this object and the specified GCKGameManagerState.

- (BOOL) hasGameDataChanged: (GCKGameManagerState *)  otherState

Returns whether the game data is different between this object and the specified GCKGameManagerState.

- (BOOL) hasGameStatusTextChanged: (GCKGameManagerState *)  otherState

Returns whether game status text is different between this object and the specified GCKGameManagerState.

- (BOOL) hasPlayerChanged: (NSString *)  playerId
otherState: (GCKGameManagerState *)  otherState 

Returns whether the player with the specified player ID has changed between this object and the specified GCKGameManagerState.

- (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 GCKGameManagerState.

- (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 GCKGameManagerState.

- (NSArray *) getListOfChangedPlayers: (GCKGameManagerState *)  otherState

Returns a list of player IDs that are different between this object and the specified GCKGameManagerState.

This includes players that were added, removed, or have changed in any way.

Property Documentation

- (GCKLobbyState) lobbyState
readnonatomicassign

The lobby state.

Valid values: GCKLobbyState

- (GCKGameplayState) gameplayState
readnonatomicassign

The gameplay state.

Valid values: GCKGameplayState

- (id) gameData
readnonatomiccopy

The game specific data.

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

- (NSString*) gameStatusText
readnonatomiccopy

The game status text.

- (NSArray*) players
readnonatomicassign

The list of all players in the game.

- (NSArray*) controllablePlayers
readnonatomicassign

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

- (NSArray*) connectedPlayers
readnonatomicassign

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*) connectedControllablePlayers
readnonatomicassign

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
readnonatomiccopy

The application name.

Returns nil if GCKGameManagerChannel is not yet connected to the receiver.

- (NSInteger) maxPlayers
readnonatomicassign

The maximum number of players as defined by the receiver.

Returns 0 if GCKGameManagerChannel is not yet connected to the receiver.

Google Cast iOS Sender API Reference v 2.10.1 4691