GameManagerClient.Listener

public static interface GameManagerClient.Listener

This interface was deprecated.
The Game Manager APIs are no longer supported and will be removed in a future release.

A listener that can be set in GameManagerClient to be notified when game manager state is updated or when game messages are received for players controlled by this sender.

Public Method Summary

abstract void
onGameMessageReceived(String playerId, JSONObject gameMessage)
Called when a game message for a player controlled by this sender is received.
abstract void
onStateChanged(GameManagerState newState, GameManagerState oldState)
Called when the game manager state has changed.

Public Methods

public abstract void onGameMessageReceived (String playerId, JSONObject gameMessage)

Called when a game message for a player controlled by this sender is received.

Parameters
playerId The player ID of the recipient of the message.
gameMessage The game message.

public abstract void onStateChanged (GameManagerState newState, GameManagerState oldState)

Called when the game manager state has changed.

This includes lobby, gameplay, player connect/disconnect, game data, and player data changes.

Use utility functions in GameManagerState to find out what changed since the previous snapshot.

Parameters
newState The new game manager state.
oldState The old game manager state.