Constructor
new module:common/game-map/Room(i, x, y, width, height)
Constructor is private.
See GameMap.rooms or GameMap.getRect for instances of Room.
Parameters:
Name | Type | Description |
---|---|---|
i |
The index of the room | |
x |
||
y |
||
width |
||
height |
Properties:
Name | Type | Description |
---|---|---|
x |
number | X coordinate of the room |
y |
number | Y coordinate of the room |
width |
number | Width coordinate of the room |
height |
number | Height coordinate of the room |
type |
string | Always room |
noMonsters |
boolean | No monsters allowed in this room |
Members
above
Get the room above this one (if one exists)
below
Get the room below this one (if one exists)
corridors
All corridors connected to this room
left
Get the room to the left of this one (if one exists)
noMonsters
Is this room allowed to have monsters
right
Get the room to the right of this one (if one exists)