Difference between revisions of "TileMap"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
<!-- GIDEROSOBJ:TileMap -->
 
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
 
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
Line 11: Line 12:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/TileMap.new|TileMap.new]] ''<translate>creates a new TileMap instance</translate>''<br/>
+
[[Special:MyLanguage/TileMap.new|TileMap.new]] ''<translate>creates a new TileMap instance</translate>''<br/><!-- GIDEROSMTD:TileMap.new -->
[[Special:MyLanguage/TileMap:clearTile|TileMap:clearTile]] ''<translate>set an empty tile at given indices</translate>''<br/>
+
[[Special:MyLanguage/TileMap:clearTile|TileMap:clearTile]] ''<translate>set an empty tile at given indices</translate>''<br/><!-- GIDEROSMTD:TileMap:clearTile -->
[[Special:MyLanguage/TileMap:getTile|TileMap:getTile]] ''<translate>returns the index of the tile</translate>''<br/>
+
[[Special:MyLanguage/TileMap:getTile|TileMap:getTile]] ''<translate>returns the index of the tile</translate>''<br/><!-- GIDEROSMTD:TileMap:getTile -->
[[Special:MyLanguage/TileMap:setRepeat|TileMap:setRepeat]] ''<translate>Indicate if the tilemap should repeat itself</translate>''<br/>
+
[[Special:MyLanguage/TileMap:setRepeat|TileMap:setRepeat]] ''<translate>Indicate if the tilemap should repeat itself</translate>''<br/><!-- GIDEROSMTD:TileMap:setRepeat -->
[[Special:MyLanguage/TileMap:setTexture|TileMap:setTexture]] ''<translate>Change the tile texture/atlas used by the tilemap</translate>''<br/>
+
[[Special:MyLanguage/TileMap:setTexture|TileMap:setTexture]] ''<translate>Change the tile texture/atlas used by the tilemap</translate>''<br/><!-- GIDEROSMTD:TileMap:setTexture -->
[[Special:MyLanguage/TileMap:setTile|TileMap:setTile]] ''<translate>sets the index of the tile</translate>''<br/>
+
[[Special:MyLanguage/TileMap:setTile|TileMap:setTile]] ''<translate>sets the index of the tile</translate>''<br/><!-- GIDEROSMTD:TileMap:setTile -->
[[Special:MyLanguage/TileMap:shift|TileMap:shift]] ''<translate>shifts the tile map</translate>''<br/>
+
[[Special:MyLanguage/TileMap:shift|TileMap:shift]] ''<translate>shifts the tile map</translate>''<br/><!-- GIDEROSMTD:TileMap:shift -->
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
[[Special:MyLanguage/TileMap.FLIP_DIAGONAL|TileMap.FLIP_DIAGONAL]]<br/>
+
[[Special:MyLanguage/TileMap.FLIP_DIAGONAL|TileMap.FLIP_DIAGONAL]]<br/><!-- GIDEROSCST:TileMap.FLIP_DIAGONAL -->
[[Special:MyLanguage/TileMap.FLIP_HORIZONTAL|TileMap.FLIP_HORIZONTAL]]<br/>
+
[[Special:MyLanguage/TileMap.FLIP_HORIZONTAL|TileMap.FLIP_HORIZONTAL]]<br/><!-- GIDEROSCST:TileMap.FLIP_HORIZONTAL -->
[[Special:MyLanguage/TileMap.FLIP_VERTICAL|TileMap.FLIP_VERTICAL]]<br/>
+
[[Special:MyLanguage/TileMap.FLIP_VERTICAL|TileMap.FLIP_VERTICAL]]<br/><!-- GIDEROSCST:TileMap.FLIP_VERTICAL -->
 
|}
 
|}

Revision as of 15:56, 31 August 2018

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
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