GCKGameManagerState 類別
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
代表接收器裝置上執行之 Game Manager 狀態的物件。
- Deprecated:
- 遊戲管理員 API 已停止支援,並將在日後推出的版本中移除。
繼承 NSObject。
傳回處於指定玩家狀態的玩家清單。
- Parameters
-
playerState | The player state. |
傳回這個物件與指定遊戲管理員狀態的大廳狀態是否不同。
- Parameters
-
otherState | The game manager state to compare to. |
傳回這個物件與指定遊戲管理員狀態的遊戲狀態是否不同。
- Parameters
-
otherState | The game manager state to compare to. |
傳回這個物件與指定遊戲管理工具狀態之間的遊戲資料是否不同。
- Parameters
-
otherState | The game manager state to compare to. |
傳回這個物件與指定遊戲管理員狀態的遊戲狀態文字是否不同。
- 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. |
傳回這個物件與指定遊戲管理員狀態之間不同的玩家 ID 清單。
包括新增、移除或以任何方式變更的球員。
- Parameters
-
otherState | The game manager state to compare to. |
大廳狀態。
如需有效值,請參閱 GCKLobbyState。
遊戲狀態。
如要瞭解有效值,請參閱 GCKGameplayState。
遊戲專屬資料。
可以是可使用 NSJSONSerialization 序列化為 JSON 的物件,也可以是 nil
。
- (NSString*) gameStatusText |
|
readnonatomiccopy |
- (NSString*) applicationName |
|
readnonatomiccopy |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[[["The `GCKGameManagerState` class represents the state of the Game Manager on a receiver device, providing access to lobby, gameplay, and player information."],["This class is deprecated and will be removed in a future release; the Game Manager API is no longer supported."],["It offers methods to retrieve player details, check for changes in game state, and access lists of players."],["Several properties expose data like lobby state, gameplay state, game data, player lists, application name, and maximum player count."],["Developers can use this class to track and react to changes in the game session on the receiver."]]],["The GCKGameManagerState class represents the state of a Game Manager on a receiver device, although it is deprecated. Key actions include retrieving player information via `getPlayer:` or `getPlayersInState:`, and checking for changes between game states. Methods exist to check if the lobby state, gameplay state, game data, or game status text have changed. Additionally, there are methods to determine if specific players have changed or if their state or data has been altered, using `hasPlayerChanged`, `hasPlayerStateChanged`, `hasPlayerDataChanged`, and a method to retrieve a list of changed players `getListOfChangedPlayers`. Property methods are also provided to retrieve the lobby, gameplay, game data, status text, players, and other related data.\n"]]