Difference between revisions of "TileMap:getTile"

From GiderosMobile
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 />
+
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.<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>
=== <translate>Parameters</translate> ===
+
 
'''x''': (number) <translate>The x-position of tile</translate> <br/>
+
=== Parameters ===
'''y''': (number) <translate>The y-position of tile</translate> <br/>
+
'''x''': (number) the x-position of tile<br/>
=== <translate>Return values</translate> ===
+
'''y''': (number) the y-position of tile<br/>
'''<translate>Returns</translate>''' (number) <translate>x tile position of texture or nil if tile is not set</translate><br/>
+
 
'''<translate>Returns</translate>''' (number) <translate>y tile position of texture or nil if tile is not set</translate><br/>
+
=== Return values ===
'''<translate>Returns</translate>''' (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) x tile position of texture or nil if tile is not set<br/>
'''<translate>Returns</translate>''' (number) <translate>Color tint of the tile</translate><br/>
+
'''Returns''' (number) y tile position of texture or nil if tile is not set<br/>
'''<translate>Returns</translate>''' (number) <translate>Alpha tint of the tile</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) color tint of the tile<br/>
 +
'''Returns''' (number) alpha tint of the tile<br/>
  
 
{{TileMap}}
 
{{TileMap}}

Revision as of 01:51, 19 March 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