TileMap.new: Difference between revisions
No edit summary |
m Text replacement - "</source>" to "</syntaxhighlight>" |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2011.6<br/> | |||
''' | '''Class:''' [[TileMap]]<br/> | ||
''' | |||
=== | === Description === | ||
Creates a new '''TileMap''' instance. | |||
Creates a new | <syntaxhighlight lang="lua"> | ||
TileMap.new(width,height,texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy,displaywidth,displayheight) | |||
< | </syntaxhighlight> | ||
</ | === Parameters === | ||
=== | '''width''': (number) the width of the map in tiles<br/> | ||
'''width''': (number) | '''height''': (number) the height of the map in tiles<br/> | ||
'''height''': (number) | '''texture''': (TextureBase) the texture used in rendering tile map<br/> | ||
'''texture''': (TextureBase) | '''tilewidth''': (number) the width of a tile in pixels<br/> | ||
'''tilewidth''': (number) | '''tileheight''': (number) the height of a tile in pixels<br/> | ||
'''tileheight''': (number) | '''spacingx''': (number, default = 0) the x-spacing in pixels between the tiles in this tileset<br/> | ||
'''spacingx''': (number, default = 0) | '''spacingy''': (number, default = 0) the y-spacing in pixels between the tiles in this tileset<br/> | ||
'''spacingy''': (number, default = 0) | '''marginx''': (number, default = 0) the x-margin from the top-left of the texture<br/> | ||
'''marginx''': (number, default = 0) | '''marginy''': (number, default = 0) the y-margin from the top-left of the texture<br/> | ||
'''marginy''': (number, default = 0) | '''displaywidth''': (number, default = tilewidth) the display width of a tile in pixels<br/> | ||
'''displaywidth''': (number, default = tilewidth) | '''displayheight''': (number, default = tileheight) the display height of a tile in pixels<br/> | ||
'''displayheight''': (number, default = tileheight) | |||
{{TileMap}} | |||
Latest revision as of 13:33, 13 July 2023
Available since: Gideros 2011.6
Class: TileMap
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