TileMap:setTile: Difference between revisions

From GiderosMobile
No edit summary
m Text replacement - "</source>" to "</syntaxhighlight>"
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''Class:''' [[TileMap]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/>
 
=== <translate>Description</translate> ===
=== Description ===
<translate><br />
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.<br />
<syntaxhighlight lang="lua">
<br /></translate>
TileMap:setTile(x,y,tx,ty,flip,color,alpha)
<source lang="lua">
</syntaxhighlight>
TileMap:setTile(x,y,tx,ty,flip,color,alpha)
 
</source>
=== Parameters ===
=== <translate>Parameters</translate> ===
'''x''': (number) the x-position of tile<br/>
'''x''': (number) <translate>The x-position of tile</translate> <br/>
'''y''': (number) the y-position of tile<br/>
'''y''': (number) <translate>The y-position of tile</translate> <br/>
'''tx''': (number) the x-index of the tile<br/>
'''tx''': (number) <translate>The x-index of the tile</translate> <br/>
'''ty''': (number) the y-index of the tile<br/>
'''ty''': (number) <translate>The y-index of the tile</translate> <br/>
'''flip''': (number, default = 0) flip flag of tile. Can be combination of TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL and TileMap.FLIP_DIAGONAL<br/>
'''flip''': (number, default = 0) <translate>flip flag of tile. Can be combination of TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL and TileMap.FLIP_DIAGONAL</translate> <br/>
'''color''': (number) color tint of the tile, default to white (0xFFFFFF) '''optional'''<br/>
'''color''': (number) <translate>Color tint of the tile, default to white (0xFFFFFF)</translate> '''optional'''<br/>
'''alpha''': (number) alpha tint of the tile, default to opaque (1.0) '''optional'''<br/>
'''alpha''': (number) <translate>Alpha tint of the tile, default to opaque (1.0)</translate> '''optional'''<br/>


{{TileMap}}
{{TileMap}}

Latest revision as of 13: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