Difference between revisions of "TileMap:setTexture"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2018.2<br/>
 
'''Available since:''' Gideros 2018.2<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
 
Change the tile texture/atlas used by the tilemap.<br />
 
Change the tile texture/atlas used by the tilemap.<br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
  TileMap:setTexture(texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy)
 
  TileMap:setTexture(texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''texture''': (TextureBase) The texture used in rendering tile map <br/>
+
'''texture''': (TextureBase) <translate>The texture used in rendering tile map</translate> <br/>
'''tilewidth''': (number) The width of a tile in pixels <br/>
+
'''tilewidth''': (number) <translate>The width of a tile in pixels</translate> <br/>
'''tileheight''': (number) The height of a tile in pixels <br/>
+
'''tileheight''': (number) <translate>The height of a tile in pixels</translate> <br/>
'''spacingx''': (number, default = 0) The x-spacing in pixels between the tiles in this tileset <br/>
+
'''spacingx''': (number, default = 0) <translate>The x-spacing in pixels between the tiles in this tileset</translate> <br/>
'''spacingy''': (number, default = 0) The y-spacing in pixels between the tiles in this tileset <br/>
+
'''spacingy''': (number, default = 0) <translate>The y-spacing in pixels between the tiles in this tileset</translate> <br/>
'''marginx''': (number, default = 0) The x-margin from the top-left of the texture <br/>
+
'''marginx''': (number, default = 0) <translate>The x-margin from the top-left of the texture</translate> <br/>
'''marginy''': (number, default = 0) The y-margin from the top-left of the texture <br/>
+
'''marginy''': (number, default = 0) <translate>The y-margin from the top-left of the texture</translate> <br/>

Revision as of 13:32, 23 August 2018

Available since: Gideros 2018.2

Description


Change the tile texture/atlas used by the tilemap.

 TileMap:setTexture(texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy)

Parameters

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