forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 0
class_tileset
reduz edited this page Feb 23, 2014
·
15 revisions
Inherits: Resource\n\n### Brief Description
Tile library for tilemaps.
- void create_tile" ( int id )
- void tile_set_name" ( int id, String name )
- String tile_get_name" ( int id ) const
- void tile_set_texture" ( int id, Texture texture )
- Texture tile_get_texture" ( int id ) const
- void tile_set_offset" ( int id, Vector2 offset )
- Vector2 tile_get_offset" ( int id ) const
- void tile_set_region" ( int id, Rect2 region )
- Rect2 tile_get_region" ( int id ) const
- void tile_set_shape" ( int id, Shape2D shape )
- Shape2D tile_get_shape" ( int id ) const
- void tile_set_shapes" ( int id, Array shapes )
- Array tile_get_shapes" ( int id ) const
- void remove_tile" ( int id )
- void clear" ( )
- int get_last_unused_tile_id" ( ) const
- int find_tile_by_name" ( String name ) const
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.
== create_tile ==
- void create_tile" ( int id ) \ Create a new tile, the ID must be specified. == tile_set_name ==
- void tile_set_name" ( int id, String name ) \ Set the name of a tile, for decriptive purposes. == tile_get_name ==
- String tile_get_name" ( int id ) const \ Return the name of a tile, for decriptive purposes. == tile_set_texture ==
- void tile_set_texture" ( int id, Texture texture ) \ Set the texture of the tile. == tile_get_texture ==
- Texture tile_get_texture" ( int id ) const \ Return the texture of the tile. == tile_set_offset ==
- void tile_set_offset" ( int id, Vector2 offset ) \ Set the offset to draw the tile. == tile_get_offset ==
- Vector2 tile_get_offset" ( int id ) const \ Return the offset to draw the tile. == tile_set_region ==
- void tile_set_region" ( int id, Rect2 region ) \ Set the tile sub-region in the texture. This is common in texture atlases. == tile_get_region ==
- Rect2 tile_get_region" ( int id ) const \ Return the tile sub-region in the texture. This is common in texture atlases. == tile_set_shape ==
- void tile_set_shape" ( int id, Shape2D shape ) \ Set a shape for the tile, enabling physics to collide it. == tile_get_shape ==
- Shape2D tile_get_shape" ( int id ) const \ Return the shape of the tile. == remove_tile ==
- void remove_tile" ( int id ) \ Remove a tile, by integer id. == clear ==
- void clear" ( ) \ Clear all tiles. == get_last_unused_tile_id ==
- int get_last_unused_tile_id" ( ) const \ Find an empty id for creating a new tile. == find_tile_by_name ==
- int find_tile_by_name" ( String name ) const \ Find the first tile with the given name.