總覽
代表遊戲主機在接收器裝置上執行的狀態。
- Deprecated:
- 我們不再支援 Game Manager API,將在日後推出的版本中移除。
沿用 NSObject。
執行個體方法摘要 | |
(GCKPlayerInfo *__nullable) | - getPlayer: |
傳回指定玩家 ID 的 GCKPlayerInfo;如果玩家不存在,則傳回 nil 。更多... | |
(NSArray< GCKPlayerInfo * > *) | - getPlayersInState: |
傳回處於指定玩家狀態的玩家清單。更多... | |
(BOOL) | - hasLobbyStateChanged: |
傳回此物件與指定遊戲管理員狀態之間的大廳狀態是否不同。更多... | |
(BOOL) | - hasGameplayStateChanged: |
傳回此物件與指定遊戲管理員狀態之間的遊戲狀態是否相同。更多... | |
(BOOL) | - hasGameDataChanged: |
傳回這個物件與指定遊戲管理員狀態之間的遊戲資料是否不同。更多... | |
(BOOL) | - hasGameStatusTextChanged: |
傳回此物件與指定遊戲管理員狀態之間的遊戲狀態文字是否不同。更多... | |
(BOOL) | - hasPlayerChanged:otherState: |
傳回具有此物件 ID 的玩家是否在這個物件與指定的遊戲管理員狀態之間已變更。更多... | |
(BOOL) | - hasPlayerStateChanged:otherState: |
傳回具有此物件與指定遊戲管理員狀態之間,具有指定玩家 ID 的玩家播放器的狀態是否已變更。更多... | |
(BOOL) | - hasPlayerDataChanged:otherState: |
傳回具有此物件 ID 的玩家資料與此物件與指定遊戲管理員狀態之間的變更。更多... | |
(NSArray< NSString * > *) | - getListOfChangedPlayers: |
傳回此物件與指定遊戲管理員狀態不同的玩家 ID 清單。更多... | |
屬性摘要 | |
GCKLobbyState | lobbyState |
大廳狀態。更多... | |
GCKGameplayState | gameplayState |
遊戲狀態。更多... | |
id | gameData |
遊戲專屬資料。更多... | |
NSString * | gameStatusText |
遊戲狀態文字。更多... | |
NSArray< GCKPlayerInfo * > * | players |
遊戲中所有玩家的清單。更多... | |
NSArray< GCKPlayerInfo * > * | controllablePlayers |
由這個寄件者裝置建立的所有玩家清單。更多... | |
NSArray< GCKPlayerInfo * > * | connectedPlayers |
連線狀態玩家清單。更多... | |
NSArray< GCKPlayerInfo * > * | connectedControllablePlayers |
連線狀態玩家的玩家清單,他們同時也在這位寄件者裝置上建立。更多... | |
NSString * | applicationName |
應用程式名稱。更多... | |
NSInteger | maxPlayers |
接收者定義的玩家人數上限。更多... | |
方法說明
- (GCKPlayerInfo *__nullable) getPlayer: | (NSString *) | playerID |
傳回指定玩家 ID 的 GCKPlayerInfo;如果玩家不存在,則傳回 nil
。
- Parameters
-
playerID The player ID.
- (NSArray<GCKPlayerInfo *> *) getPlayersInState: | (GCKPlayerState) | playerState |
傳回處於指定玩家狀態的玩家清單。
- Parameters
-
playerState The player state.
- (BOOL) hasLobbyStateChanged: | (GCKGameManagerState *) | otherState |
傳回此物件與指定遊戲管理員狀態之間的大廳狀態是否不同。
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasGameplayStateChanged: | (GCKGameManagerState *) | otherState |
傳回此物件與指定遊戲管理員狀態之間的遊戲狀態是否相同。
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasGameDataChanged: | (GCKGameManagerState *) | otherState |
傳回這個物件與指定遊戲管理員狀態之間的遊戲資料是否不同。
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasGameStatusTextChanged: | (GCKGameManagerState *) | otherState |
傳回此物件與指定遊戲管理員狀態之間的遊戲狀態文字是否不同。
- Parameters
-
otherState The game manager state to compare to.
- (BOOL) hasPlayerChanged: | (NSString *) | playerId | |
otherState: | (GCKGameManagerState *) | otherState | |
傳回具有此物件 ID 的玩家是否在這個物件與指定的遊戲管理員狀態之間已變更。
- Parameters
-
playerId The player ID. otherState The game manager state to compare to.
- (BOOL) hasPlayerStateChanged: | (NSString *) | playerId | |
otherState: | (GCKGameManagerState *) | otherState | |
傳回具有此物件與指定遊戲管理員狀態之間,具有指定玩家 ID 的玩家播放器的狀態是否已變更。
- Parameters
-
playerId The player ID. otherState The game manager state to compare to.
- (BOOL) hasPlayerDataChanged: | (NSString *) | playerId | |
otherState: | (GCKGameManagerState *) | otherState | |
傳回具有此物件 ID 的玩家資料與此物件與指定遊戲管理員狀態之間的變更。
- Parameters
-
playerId The player ID. otherState The game manager state to compare to.
- (NSArray<NSString *> *) getListOfChangedPlayers: | (GCKGameManagerState *) | otherState |
傳回此物件與指定遊戲管理員狀態不同的玩家 ID 清單。
包括透過任何方式新增、移除或更動的玩家。
- Parameters
-
otherState The game manager state to compare to.
資源詳細資料
|
readnonatomicassign |
大廳狀態。
如需有效值,請參閱 GCKLobbyState。
|
readnonatomicassign |
遊戲狀態。
如需有效值,請參閱 GCKGameplayState。
|
readnonatomiccopy |
遊戲專屬資料。
可以是可使用 NSJSONSerialization 或 nil
序列化為 JSON 的物件。
|
readnonatomiccopy |
遊戲狀態文字。
|
readnonatomicstrong |
遊戲中所有玩家的清單。
|
readnonatomicassign |
由這個寄件者裝置建立的所有玩家清單。
|
readnonatomicstrong |
連線狀態玩家清單。
如果相關聯的 GCKPlayerInfo::playerState 是 GCKPlayerStateAvailable、GCKPlayerStateReady、GCKPlayerStateIdle 或 GCKPlayerStatePlaying 其中之一,系統就會將玩家視為已連線狀態。
|
readnonatomicstrong |
連線狀態玩家的玩家清單,他們同時也在這位寄件者裝置上建立。
如果相關聯的 GCKPlayerInfo::playerState 是 GCKPlayerStateAvailable、GCKPlayerStateReady、GCKPlayerStateIdle 或 GCKPlayerStatePlaying 其中之一,系統就會將玩家視為已連線狀態。
|
readnonatomiccopy |
應用程式名稱。
如果 GCKGameManagerChannel 尚未連線至接收器的遊戲管理員,會傳回 nil
。
|
readnonatomicassign |
接收者定義的玩家人數上限。
如果 GCKGameManagerChannel 尚未連線至接收端的遊戲管理員,則傳回 0。