| Package | com.electrotank.electroserver5.api |
| Class | public class QuickJoinGameRequest |
| Inheritance | QuickJoinGameRequest EsRequest EsMessage flash.events.Event |
private var _es:ElectroServer;
private function initialize():void {
_es.engine.addEventListener(MessageType.CreateOrJoinGameResponse.name, onCreateOrJoinGameResponse);
_es.engine.addEventListener(MessageType.JoinRoomEvent.name, onJoinRoomEvent);
//create the request
var qjr:QuickJoinGameRequest = new QuickJoinGameRequest();
//gameType is the name of the game as registered on the server
qjr.gameType = "PokerGame";
//zone in which to put the game
qjr.zoneName = "GameZone";
//should the game show up in the room list
qjr.hidden = false;
//if true, the game is automatically locked when you join until unlocked
qjr.locked = false;
//if true, then the request won't look for an existing game for you to join, it will only create one
qjr.createOnly = false;
//optional EsObject of data to pass into the game
var esob:EsObject = new EsObject();
esob.setInteger("potLimit", 2500);
esob.setInteger("tableSize", 8);
qjr.gameDetails = esob;
_es.engine.send(qjr);
}
private function onJoinRoomEvent(e:JoinRoomEvent):void {
trace("Joined the game room");
}
private function onCreateOrJoinGameResponse(e:CreateOrJoinGameResponse):void {
trace("Joined game: " + e.successful.toString());
}
| Property | Defined By | ||
|---|---|---|---|
| createOnly : Boolean
If true, then the request doesn't first try to search for an existing game for you to join. | QuickJoinGameRequest | ||
| criteria : SearchCriteria
A search criteria object used for a greater level of matching. | QuickJoinGameRequest | ||
| gameDetails : EsObject
Optional custom EsObject to be passed into the initialization event in the plugin when the game is created. | QuickJoinGameRequest | ||
| gameType : String
The game type as registered with the server via the Remote Admin. | QuickJoinGameRequest | ||
| hidden : Boolean
If true, the room that is the game is hidden from the room list. | QuickJoinGameRequest | ||
| locked : Boolean
If true, then the game is locked as soon as you join it (if you're the one that created it). | QuickJoinGameRequest | ||
![]() | messageNumber : int | EsMessage | |
![]() | messageType : MessageType | EsMessage | |
| password : String
Optional password used when creating or joining a game. | QuickJoinGameRequest | ||
![]() | requestId : int | EsMessage | |
![]() | serverId : String | EsMessage | |
| zoneName : String
Name of the zone to create the game in. | QuickJoinGameRequest | ||
| Method | Defined By | ||
|---|---|---|---|
QuickJoinGameRequest(m:MessageType = null, t:TBase = null) | QuickJoinGameRequest | ||
fromThrift(t_:TBase):void [override] | QuickJoinGameRequest | ||
newThrift():TBase [override] | QuickJoinGameRequest | ||
toThrift():TBase [override] | QuickJoinGameRequest | ||
| createOnly | property |
createOnly:BooleanIf true, then the request doesn't first try to search for an existing game for you to join. It will only create a new game. If false, the server will search for an already open game that meets the criteria specified in this request.
public function get createOnly():Boolean public function set createOnly(value:Boolean):void| criteria | property |
criteria:SearchCriteriaA search criteria object used for a greater level of matching. This can be used to say, search for only games that are using a specify game map.
public function get criteria():SearchCriteria public function set criteria(value:SearchCriteria):void| gameDetails | property |
gameDetails:EsObjectOptional custom EsObject to be passed into the initialization event in the plugin when the game is created.
public function get gameDetails():EsObject public function set gameDetails(value:EsObject):void| gameType | property |
gameType:StringThe game type as registered with the server via the Remote Admin.
public function get gameType():String public function set gameType(value:String):void| hidden | property |
hidden:BooleanIf true, the room that is the game is hidden from the room list.
public function get hidden():Boolean public function set hidden(value:Boolean):void| locked | property |
locked:BooleanIf true, then the game is locked as soon as you join it (if you're the one that created it). The game can later be unlocked by the game plugin.
public function get locked():Boolean public function set locked(value:Boolean):void| password | property |
password:StringOptional password used when creating or joining a game.
public function get password():String public function set password(value:String):void| zoneName | property |
zoneName:StringName of the zone to create the game in.
public function get zoneName():String public function set zoneName(value:String):void| QuickJoinGameRequest | () | Constructor |
public function QuickJoinGameRequest(m:MessageType = null, t:TBase = null)m:MessageType (default = null) | |
t:TBase (default = null) |
| fromThrift | () | method |
override public function fromThrift(t_:TBase):voidParameters
t_:TBase |
| newThrift | () | method |
override public function newThrift():TBaseReturnsTBase |
| toThrift | () | method |
override public function toThrift():TBaseReturnsTBase |