Skip to content
reduz edited this page Feb 23, 2014 · 15 revisions

TileSet

Inherits: Resource\n\n

Brief Description

Tile library for tilemaps.

Member Functions

Description

A TileSet is a library of tiles for a tilemap. It contains a list of tiles, each consisting of a sprite and optional collision shapes.

Member Function Description

  • void create_tile ( int id ) \ Create a new tile, the ID must be specified.
  • void tile_set_region ( int id, Rect2 region ) \ Set the tile sub-region in the texture. This is common in texture atlases.
  • Rect2 tile_get_region ( int id ) const \ Return the tile sub-region in the texture. This is common in texture atlases.
  • void clear ( ) \ Clear all tiles.
Clone this wiki locally