Difference between revisions of "TileMap:setTile"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Sets the index of the tile. The tile indices are starting from 1.<br /> <br /> <source lang="lu...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
+ | '''Class:''' [[TileMap]]<br/> | ||
+ | |||
=== Description === | === Description === | ||
− | + | Sets the index of the tile. The tile indices are starting from 1. | |
− | Sets the index of the tile. The tile indices are starting from 1. | + | <syntaxhighlight lang="lua"> |
− | < | + | TileMap:setTile(x,y,tx,ty,flip,color,alpha) |
− | + | </syntaxhighlight> | |
− | + | ||
− | </ | + | === Parameters === |
− | '''x | + | '''x''': (number) the x-position of tile<br/> |
− | '''y | + | '''y''': (number) the y-position of tile<br/> |
− | '''tx | + | '''tx''': (number) the x-index of the tile<br/> |
− | '''ty | + | '''ty''': (number) the y-index of the tile<br/> |
− | '''flip | + | '''flip''': (number, default = 0) flip flag of tile. Can be combination of TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL and TileMap.FLIP_DIAGONAL<br/> |
− | '''color | + | '''color''': (number) color tint of the tile, default to white (0xFFFFFF) '''optional'''<br/> |
− | '''alpha | + | '''alpha''': (number) alpha tint of the tile, default to opaque (1.0) '''optional'''<br/> |
+ | |||
+ | {{TileMap}} |
Latest revision as of 14:33, 13 July 2023
Available since: Gideros 2011.6
Class: TileMap
Description
Sets the index of the tile. The tile indices are starting from 1.
TileMap:setTile(x,y,tx,ty,flip,color,alpha)
Parameters
x: (number) the x-position of tile
y: (number) the y-position of tile
tx: (number) the x-index of the tile
ty: (number) the y-index of the tile
flip: (number, default = 0) flip flag of tile. Can be combination of TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL and TileMap.FLIP_DIAGONAL
color: (number) color tint of the tile, default to white (0xFFFFFF) optional
alpha: (number) alpha tint of the tile, default to opaque (1.0) optional