Game Development Reference
In-Depth Information
The sendGameStateAction method can be used to send a state to all players in a
game. The game state type is set to transient and will not be persisted for the game
session. The ID is also not assigned for a game state action.
function onNewGameState(gameState:GameStateClient):void;
The onNewGameState callback is fired when any game client in the game room
successfully updates a new game state to the game (via updateGameState ). The
updated game state is also received by the originator. The server validates if the
game state with the ID already exists. Unique and initial game states may not be
updated. Any violation is notified back to the sender via onGameStateError .
function onUpdateGameState(gameState:GameStateClient):void;
The onUpdateGameState callback is fired when any game client in the game room
successfully updates new game state to the game (via updateGameState ). The updated
game state is also received by the originator. The server validates if the game state with
the ID already exists. Unique and initial game states may not be updated.
function onRemoveGameState(gameState:GameStateClient):void;
The onRemoveGameState callback is fired when any game client in the game room
successfully deletes the game state (via removeGameState ). The callback is also fired
on the originator of the delete game state call. The server validates if the game state
with the ID exists. Unique and initial game states may not be deleted.
function onGameStateAction(gameState:GameStateClient):void;
The onGameStateAction callback is fired when any game client in the game
room calls sendGameStateAction . The callback is also fired on the originator of
the call. The server does not assign an ID and does not persist for the game's
session period. Newly joined players do not receive any previously sent game
states via sendGameStateAction .
Miscellaneous classes
Among the essential screen classes, PulseUI framework also provides some useful
classes that we may use for our game implementation. The SpriteDissolve class
used to make a bunch of sprites to disappear included in the PulseUI along with
other useful game related classes are presented in Appendix-2.
 
Search WWH ::




Custom Search