Difference between revisions of "TileMap"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' android, ios, mac, pc<br/>
+
'''<translate>Supported platforms</translate>:''' [[File:Platform android]][[File:Platform ios]][[File:Platform mac]][[File:Platform pc]]<br/>
'''Available since:''' Gideros 2011.6<br/>
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 +
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />
The [[Special:MyLanguage/TileMap|TileMap]] class is used to work with tile maps easily and efficiently.<br />
+
The `TileMap` class is used to work with tile maps easily and efficiently.<br />
 
<br />
 
<br />
Check [[Special:MyLanguage/Desert|Desert]] and [[Special:MyLanguage/Sewers|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%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|

Revision as of 10:29, 24 August 2018

Supported platforms: File:Platform androidFile:Platform iosFile:Platform macFile:Platform pc
Available since: Gideros 2011.6
Inherits from: Sprite

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