Difference between revisions of "TileMap"
From GiderosMobile
Line 6: | Line 6: | ||
The `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 `Desert` and `Sewers` examples provided with Gideros for usage of TileMap with export from editor | + | Check `Desert` and `Sewers` examples provided with Gideros for usage of TileMap with export from editor{|- |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {|- | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Methods === | === Methods === | ||
Line 35: | Line 19: | ||
=== Events === | === Events === | ||
=== Constants === | === Constants === | ||
− | [[TileMap.FLIP_DIAGONAL]] | + | [[TileMap.FLIP_DIAGONAL]]<br/> |
− | [[TileMap.FLIP_HORIZONTAL]] | + | [[TileMap.FLIP_HORIZONTAL]]<br/> |
− | [[TileMap.FLIP_VERTICAL]] | + | [[TileMap.FLIP_VERTICAL]]<br/> |
|} | |} |
Revision as of 09:12, 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{|-
| style="width: 50%;"|
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
| style="width: 50%;"|
Events
Constants
TileMap.FLIP_DIAGONAL
TileMap.FLIP_HORIZONTAL
TileMap.FLIP_VERTICAL
|}