Difference between revisions of "TileMap.new"
m |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> | ||
− | === | + | |
− | + | === Description === | |
− | Creates a new [[Special:MyLanguage/TileMap|TileMap]] instance. | + | Creates a new [[Special:MyLanguage/TileMap|TileMap]] instance. |
− | |||
<source lang="lua"> | <source lang="lua"> | ||
− | + | TileMap.new(width,height,texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy,displaywidth,displayheight) | |
</source> | </source> | ||
− | === | + | |
+ | === Parameters === | ||
'''width''': (number) <translate>The width of the map in tiles</translate> <br/> | '''width''': (number) <translate>The width of the map in tiles</translate> <br/> | ||
'''height''': (number) <translate>The height of the map in tiles</translate> <br/> | '''height''': (number) <translate>The height of the map in tiles</translate> <br/> |
Revision as of 00:09, 8 March 2020
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