Class Index | File Index

Classes


Class ROT.Map.Feature.Room


Extends ROT.Map.Feature.
Room
Defined in: <rot.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
ROT.Map.Feature.Room(x1, y1, x2, y2, doorX, doorY)
Method Summary
Method Attributes Method Name and Description
 
addDoor(x, y)
 
 
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
 
 
 
 
 
 
 
 
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

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

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Mar 08 2013 11:07:30 GMT+0100 (CET)