Game Development Reference
In-Depth Information
var room:GameRoomClient = new GameRoomClient();
// Set the name of the room from what is entered
// in the text field
room.setRoomName(m_ti.text);
// Limit maximum players that can
// enter the room to three
room.setMaxPlayerCount(3);
// Let players join the game
// even after it is started
room.setRoomType(GameConstants.ROOM_ALLOW_POST_START);
// set the player to be in ready
// state as soon as they enter the room
room.setAutoReady(1);
// Send a request to the server
// to create the game room
PulseGame.getInstance().getGameClient().
createGameRoom(room);
}
All samples provided with the Pulse package simply take in a name for the room.
But for a real game, you may want to provide more options, such as password,
max players, and others, for a player to control.
Customizing the new game screen
In order to provide our own implementation for the new game screen, we need
to override the initNewGameScreen defined in the PulseGame.
The subclass of game screen must then override init where we create all the sprites
needed. The show and hide methods are overridden to display them onto the screen
and then remove them respectively.
protected override function initNewGameScreen():void
{
 
Search WWH ::




Custom Search