Game Development Reference
In-Depth Information
Following is the default method implementation:
protected function
shouldShowRoom(room:GameRoomClient):Boolean {
var show:Boolean;
show = (room.getRoomType() ==
GameConstants.ROOM_ALLOW_POST_START);
if(show == true)
return true;
else {
return (room.getRoomStatus() ==
GameConstants.ROOM_STATE_WAITING);
}
}
Lobby and room-related API
Upon successful logging, all game implementation must call the
enterLobby method.
public function enterLobby(gameLobbyId:String = "DefaultLobby"):void
You may pass a null string in case you only wish to have one default lobby. The
following notification will be received again by the client whether the request to
enter a lobby was successful or not. At this point, the game screen should switch
to the lobby screen.
function onEnteredLobby(error:int):void
If entering a lobby was successful, then the client will start to receive a bunch of
onNewGameRoom notifications, one for each room that was found active in the entered
lobby. The implementation should draw the corresponding game room with the
details on the lobby screen.
function onNewGameRoom(room:GameRoomClient):void
The client may also receive other lobby-related notifications such as
onUpdateGameRoom for any room updates and onRemoveGameRoom for any
room objects that no longer exist in lobby.
function onUpdateGameRoom(room:GameRoomClient):void
function onRemoveGameRoom(room:GameRoomClient):void
If the player wishes to join an existing game room in the lobby, you simply call
joinGameRoom and pass the corresponding room object.
public function joinGameRoom(gameRoom:GameRoomClient):void
 
Search WWH ::




Custom Search