Packagecom.electrotank.electroserver5.zone
Classpublic class Zone
InheritanceZone Inheritance Object

This class represents a zone on the server. A zone is a collection of rooms.



Public Properties
 PropertyDefined By
  id : int
Gets the id of the zone.
Zone
  name : String
Ges the name of the zone.
Zone
  rooms : Array
[read-only] Gets the list of Room objects in this zone.
Zone
Public Methods
 MethodDefined By
  
Creates a new instance of the Zone class.
Zone
  
addJoinedRoom(room:Room):void
Adds a room to the joinedRooms list.
Zone
  
Gets a list of rooms in this zone that you happen to be joined to.
Zone
  
Removes a room from the joinedRoom list.
Zone
  
roomById(id:int):Room
Gets a Room by id.
Zone
  
roomByName(name:String):Room
Gets a Room by name.
Zone
Property Detail
idproperty
id:int

Gets the id of the zone.


Implementation
    public function get id():int
    public function set id(value:int):void
nameproperty 
name:String

Ges the name of the zone.


Implementation
    public function get name():String
    public function set name(value:String):void
roomsproperty 
rooms:Array  [read-only]

Gets the list of Room objects in this zone.


Implementation
    public function get rooms():Array
Constructor Detail
Zone()Constructor
public function Zone()

Creates a new instance of the Zone class.

Method Detail
addJoinedRoom()method
public function addJoinedRoom(room:Room):void

Adds a room to the joinedRooms list.

Parameters

room:Room — room to add.

getJoinedRooms()method 
public function getJoinedRooms():Array

Gets a list of rooms in this zone that you happen to be joined to.

Returns
Array
removeJoinedRoom()method 
public function removeJoinedRoom(room:Room):void

Removes a room from the joinedRoom list.

Parameters

room:Room — to remove.

roomById()method 
public function roomById(id:int):Room

Gets a Room by id.

Parameters

id:int — of the room to return.

Returns
Room — Room object with the id specified.
roomByName()method 
public function roomByName(name:String):Room

Gets a Room by name.

Parameters

name:String — of the room to return.

Returns
Room — Room object with the name specified.