Class: BackgroundMap

BackgroundMap

Tilemap node


new BackgroundMap(tilesize, data, tileset)

Parameters:
Name Type Description
tilesize Number

Size of a single tile(in pixel)

data Array

Map ata

tileset Texture

Tileset texture

Source:

Members


<readonly> height

Height of this map (in tile)

Source:

<readonly> width

Width of this map (in tile)

Source:

Methods


getTile(r, q)

Get the tile with its row and column

Parameters:
Name Type Description
r Number

Row

q Number

Column

Source:
Returns:

Tile index

Type
Number

getTileAt(x, y)

Get the tile at a specific position

Parameters:
Name Type Description
x Number

X position

y Number

Y position

Source:
Returns:

Tile index

Type
Number

setTile(r, q, tile)

Set the tile at (row, column)

Parameters:
Name Type Description
r Number

Row

q Number

Column

tile Number

Tile index to set

Source:

setTileAt(x, y, tile)

Set the tile at a specific position

Parameters:
Name Type Description
x Number

X position

y Number

Y position

tile Number

Tile index

Source: