|
ElectroServer 5 Client: C#
|
When a user wants to leave a room it can be done via this request. More...
Public Member Functions | |
| LeaveRoomRequest () | |
| LeaveRoomRequest (TBase t) | |
| override TBase | ToThrift () |
| override TBase | NewThrift () |
| override void | FromThrift (TBase t_) |
Properties | |
| int | ZoneId [get, set] |
| The id of the zone that contains the room. More... | |
| int | RoomId [get, set] |
| The id of the room to leave. More... | |
When a user wants to leave a room it can be done via this request.
Just sent the room id and zone id to the server. When the user has been removed from the room a LeaveRoomEvent will occur.
This shows how to leave a room and capture the LeaveRoomEvent.
private function leaveRoom():void {
_es.engine.addEventListener(MessageType.LeaveRoomEvent.name, onLeaveRoomEvent);var lr:LeaveRoomRequest = new LeaveRoomRequest(); lr.roomId = _myRoom.id; lr.zoneId = _myRoom.zoneId;
_es.engine.send(lr); }
private function onLeaveRoomEvent(e:LeaveRoomEvent):void {
trace("room left");
} | Electrotank.Electroserver5.Api.LeaveRoomRequest.LeaveRoomRequest | ( | ) |
| Electrotank.Electroserver5.Api.LeaveRoomRequest.LeaveRoomRequest | ( | TBase | t | ) |
|
virtual |
Implements Electrotank.Electroserver5.Api.EsMessage.
|
virtual |
Implements Electrotank.Electroserver5.Api.EsMessage.
|
virtual |
Implements Electrotank.Electroserver5.Api.EsMessage.
|
getset |
The id of the room to leave.
|
getset |
The id of the zone that contains the room.