Difference between revisions of "TileMap:getTile"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
 
Returns the index of the tile. The tile indices are starting from 1.<br />
 
Returns the index of the tile. The tile indices are starting from 1.<br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
(number), (number), (number), (number), (number) = TileMap:getTile(x,y)
 
(number), (number), (number), (number), (number) = TileMap:getTile(x,y)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''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/>
 
=== Return values ===
 
=== Return values ===
'''Returns''' (number) x tile position of texture or nil if tile is not set<br/>
+
'''Returns''' (number) <translate>x tile position of texture or nil if tile is not set</translate><br/>
'''Returns''' (number) y tile position of texture or nil if tile is not set<br/>
+
'''Returns''' (number) <translate>y tile position of texture or nil if tile is not set</translate><br/>
'''Returns''' (number) flip flag (TileMap.FLIP_DIAGONAL, TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL) of tile or nil if tile is not set<br/>
+
'''Returns''' (number) <translate>flip flag (TileMap.FLIP_DIAGONAL, TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL) of tile or nil if tile is not set</translate><br/>
'''Returns''' (number) Color tint of the tile<br/>
+
'''Returns''' (number) <translate>Color tint of the tile</translate><br/>
'''Returns''' (number) Alpha tint of the tile<br/>
+
'''Returns''' (number) <translate>Alpha tint of the tile</translate><br/>

Revision as of 13:32, 23 August 2018

Available since: Gideros 2011.6

Description


Returns the index of the tile. The tile indices are starting from 1.

(number), (number), (number), (number), (number) = TileMap:getTile(x,y)

Parameters

x: (number) The x-position of tile
y: (number) The y-position of tile

Return values

Returns (number) x tile position of texture or nil if tile is not set
Returns (number) y tile position of texture or nil if tile is not set
Returns (number) flip flag (TileMap.FLIP_DIAGONAL, TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL) of tile or nil if tile is not set
Returns (number) Color tint of the tile
Returns (number) Alpha tint of the tile