Class ROT.Map.Feature.Room
Extends
ROT.Map.Feature.
Room
Defined in: <rot.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
ROT.Map.Feature.Room(x1, y1, x2, y2, doorX, doorY)
|
Method Attributes | Method Name and Description |
---|---|
addDoor(x, y)
|
|
addDoors(isWallCallback)
|
|
create(digCallback)
|
|
<static> |
ROT.Map.Feature.Room.createRandom(availWidth, availHeight, options)
Room of random size within a given dimensions
|
<static> |
ROT.Map.Feature.Room.createRandomAt(x, y, dx, dy, options)
Room of random size, with a given doors and direction
|
<static> |
ROT.Map.Feature.Room.createRandomCenter(cx, cy, options)
Room of random size, positioned around center coords
|
debug()
|
|
getDoors()
|
|
getLeft()
|
|
getRight()
|
|
getTop()
|
|
isValid(isWallCallback, canBeDugCallback)
|
Class Detail
ROT.Map.Feature.Room(x1, y1, x2, y2, doorX, doorY)
- Parameters:
- {int} x1
- {int} y1
- {int} x2
- {int} y2
- {int} doorX Optional
- {int} doorY Optional
Method Detail
addDoor(x, y)
- Parameters:
- x
- y
addDoors(isWallCallback)
- Parameters:
- isWallCallback
clearDoors()
create(digCallback)
- Parameters:
- {function} digCallback
- Dig callback with a signature (x, y, value). Values: 0 = empty, 1 = wall, 2 = door. Multiple doors are allowed.
<static>
ROT.Map.Feature.Room.createRandom(availWidth, availHeight, options)
Room of random size within a given dimensions
- Parameters:
- availWidth
- availHeight
- options
<static>
ROT.Map.Feature.Room.createRandomAt(x, y, dx, dy, options)
Room of random size, with a given doors and direction
- Parameters:
- x
- y
- dx
- dy
- options
<static>
ROT.Map.Feature.Room.createRandomCenter(cx, cy, options)
Room of random size, positioned around center coords
- Parameters:
- cx
- cy
- options
debug()
getBottom()
getCenter()
getDoors()
- Parameters:
- {function}
getLeft()
getRight()
getTop()
isValid(isWallCallback, canBeDugCallback)
- Parameters:
- isWallCallback
- canBeDugCallback