Difference between revisions of "TileMap:getTile"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Returns the index of the tile. The tile indices are starting from 1.<br /> <br /> <source lang=...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(10 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 === | ||
− | + | Returns the index of the tile. The tile indices are starting from 1. | |
− | Returns the index of the tile. The tile indices are starting from 1. | + | <syntaxhighlight lang="lua"> |
− | < | + | (number), (number), (number), (number), (number) = TileMap:getTile(x,y) |
− | + | </syntaxhighlight> | |
− | (number) (number) (number) (number) (number) | + | |
− | </ | + | === Parameters === |
− | '''x | + | '''x''': (number) the x-position of tile<br/> |
− | '''y | + | '''y''': (number) the y-position of tile<br/> |
+ | |||
+ | === Return values === | ||
'''Returns''' (number) x tile position of texture or nil if tile is not set<br/> | '''Returns''' (number) x tile position of texture or nil if tile is not set<br/> | ||
'''Returns''' (number) y tile position of texture or nil if tile is not set<br/> | '''Returns''' (number) y tile position of texture or nil if tile is not set<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) flip flag (TileMap.FLIP_DIAGONAL, TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL) of tile or nil if tile is not set<br/> | ||
− | '''Returns''' (number) | + | '''Returns''' (number) color tint of the tile<br/> |
− | '''Returns''' (number) | + | '''Returns''' (number) alpha tint of the tile<br/> |
+ | |||
+ | {{TileMap}} |
Latest revision as of 14:33, 13 July 2023
Available since: Gideros 2011.6
Class: TileMap
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