Difference between revisions of "TileMap.new"
Line 8: | Line 8: | ||
TileMap.new(width,height,texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy,displaywidth,displayheight) | TileMap.new(width,height,texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy,displaywidth,displayheight) | ||
</source> | </source> | ||
− | '''width''': (number) The width of the map in tiles | + | === Parameters === |
− | '''height''': (number) The height of the map in tiles | + | '''width''': (number) The width of the map in tiles <br/> |
− | '''texture''': (TextureBase) The texture used in rendering tile map | + | '''height''': (number) The height of the map in tiles <br/> |
− | '''tilewidth''': (number) The width of a tile in pixels | + | '''texture''': (TextureBase) The texture used in rendering tile map <br/> |
− | '''tileheight''': (number) The height of a tile in pixels | + | '''tilewidth''': (number) The width of a tile in pixels <br/> |
− | '''spacingx''': (number, default = 0) The x-spacing in pixels between the tiles in this tileset | + | '''tileheight''': (number) The height of a tile in pixels <br/> |
− | '''spacingy''': (number, default = 0) The y-spacing in pixels between the tiles in this tileset | + | '''spacingx''': (number, default = 0) The x-spacing in pixels between the tiles in this tileset <br/> |
− | '''marginx''': (number, default = 0) The x-margin from the top-left of the texture | + | '''spacingy''': (number, default = 0) The y-spacing in pixels between the tiles in this tileset <br/> |
− | '''marginy''': (number, default = 0) The y-margin from the top-left of the texture | + | '''marginx''': (number, default = 0) The x-margin from the top-left of the texture <br/> |
− | '''displaywidth''': (number, default = tilewidth) The display width of a tile in pixels | + | '''marginy''': (number, default = 0) The y-margin from the top-left of the texture <br/> |
− | '''displayheight''': (number, default = tileheight) The display height of a tile in pixels | + | '''displaywidth''': (number, default = tilewidth) The display width of a tile in pixels <br/> |
+ | '''displayheight''': (number, default = tileheight) The display height of a tile in pixels <br/> |
Revision as of 10:45, 23 August 2018
Available since: Gideros 2011.6
Description
Creates a new `TileMap` instance.
TileMap.new(width,height,texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy,displaywidth,displayheight)
Parameters
width: (number) The width of the map in tiles
height: (number) The height of the map in tiles
texture: (TextureBase) The texture used in rendering tile map
tilewidth: (number) The width of a tile in pixels
tileheight: (number) The height of a tile in pixels
spacingx: (number, default = 0) The x-spacing in pixels between the tiles in this tileset
spacingy: (number, default = 0) The y-spacing in pixels between the tiles in this tileset
marginx: (number, default = 0) The x-margin from the top-left of the texture
marginy: (number, default = 0) The y-margin from the top-left of the texture
displaywidth: (number, default = tilewidth) The display width of a tile in pixels
displayheight: (number, default = tileheight) The display height of a tile in pixels