GCKGameManagerState 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在接收器设备上运行的游戏管理器的状态表示。
- 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 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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"]],["最后更新时间 (UTC):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"]]