Difference between revisions of "TileMap"

From GiderosMobile
Line 8: Line 8:
 
Check [[Desert]] and [[Sewers]] examples provided with Gideros for usage of TileMap with export from editor</translate>
 
Check [[Desert]] and [[Sewers]] examples provided with Gideros for usage of TileMap with export from editor</translate>
 
{|-
 
{|-
| style="width: 50%;"|
+
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[TileMap.new]] {{<translate>creates a new TileMap instance</translate>}}<br/>
+
[[TileMap.new]] ''<translate>creates a new TileMap instance</translate>''<br/>
[[TileMap:clearTile]] {{<translate>set an empty tile at given indices</translate>}}<br/>
+
[[TileMap:clearTile]] ''<translate>set an empty tile at given indices</translate>''<br/>
[[TileMap:getTile]] {{<translate>returns the index of the tile</translate>}}<br/>
+
[[TileMap:getTile]] ''<translate>returns the index of the tile</translate>''<br/>
[[TileMap:setRepeat]] {{<translate>Indicate if the tilemap should repeat itself</translate>}}<br/>
+
[[TileMap:setRepeat]] ''<translate>Indicate if the tilemap should repeat itself</translate>''<br/>
[[TileMap:setTexture]] {{<translate>Change the tile texture/atlas used by the tilemap</translate>}}<br/>
+
[[TileMap:setTexture]] ''<translate>Change the tile texture/atlas used by the tilemap</translate>''<br/>
[[TileMap:setTile]] {{<translate>sets the index of the tile</translate>}}<br/>
+
[[TileMap:setTile]] ''<translate>sets the index of the tile</translate>''<br/>
[[TileMap:shift]] {{<translate>shifts the tile map</translate>}}<br/>
+
[[TileMap:shift]] ''<translate>shifts the tile map</translate>''<br/>
| style="width: 50%;"|
+
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===

Revision as of 14:31, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description


The TileMap class is used to work with tile maps easily and efficiently.

Check Desert and Sewers examples provided with Gideros for usage of TileMap with export from editor

Methods

TileMap.new creates a new TileMap instance
TileMap:clearTile set an empty tile at given indices
TileMap:getTile returns the index of the tile
TileMap:setRepeat Indicate if the tilemap should repeat itself
TileMap:setTexture Change the tile texture/atlas used by the tilemap
TileMap:setTile sets the index of the tile
TileMap:shift shifts the tile map

Events

Constants

TileMap.FLIP_DIAGONAL
TileMap.FLIP_HORIZONTAL
TileMap.FLIP_VERTICAL