TileSet

Tile library for tilemaps.

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. Tiles are referenced by a unique integer ID.

@GodotBaseClass
struct TileSet {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

AutotileBindings
enum AutotileBindings
BitmaskMode
enum BitmaskMode
Constants
enum Constants
TileMode
enum TileMode

Functions

_forwardSubtileSelection
Vector2 _forwardSubtileSelection(long autotile_id, long bitmask, GodotObject tilemap, Vector2 tile_location)
_isTileBound
bool _isTileBound(long drawn_id, long neighbor_id)
autotileGetBitmaskMode
TileSet.BitmaskMode autotileGetBitmaskMode(long id)
autotileGetSize
Vector2 autotileGetSize(long id)
autotileSetBitmaskMode
void autotileSetBitmaskMode(long id, long mode)
autotileSetSize
void autotileSetSize(long id, Vector2 size)
clear
void clear()

Clears all tiles.

createTile
void createTile(long id)

Creates a new tile with the given ID.

findTileByName
long findTileByName(StringArg0 name)

Returns the first tile matching the given name.

getLastUnusedTileId
long getLastUnusedTileId()

Returns the ID following the last currently used ID, useful when creating a new tile.

getTilesIds
Array getTilesIds()

Returns an array of all currently used tile IDs.

opAssign
TileSet opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(TileSet other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
removeTile
void removeTile(long id)

Removes the given tile ID.

tileAddShape
void tileAddShape(long id, Shape2D shape, Transform2D shape_transform, bool one_way, Vector2 autotile_coord)

Adds a shape to the tile.

tileGetLightOccluder
Ref!OccluderPolygon2D tileGetLightOccluder(long id)

Returns the tile's light occluder.

tileGetMaterial
Ref!ShaderMaterial tileGetMaterial(long id)

Returns the tile's material.

tileGetModulate
Color tileGetModulate(long id)

Returns the tile's modulation color.

tileGetName
String tileGetName(long id)

Returns the tile's name.

tileGetNavigationPolygon
Ref!NavigationPolygon tileGetNavigationPolygon(long id)

Returns the navigation polygon of the tile.

tileGetNavigationPolygonOffset
Vector2 tileGetNavigationPolygonOffset(long id)

Returns the offset of the tile's navigation polygon.

tileGetNormalMap
Ref!Texture tileGetNormalMap(long id)

Returns the tile's normal map texture.

tileGetOccluderOffset
Vector2 tileGetOccluderOffset(long id)

Returns the offset of the tile's light occluder.

tileGetRegion
Rect2 tileGetRegion(long id)

Returns the tile sub-region in the texture.

tileGetShape
Ref!Shape2D tileGetShape(long id, long shape_id)

Returns a tile's given shape.

tileGetShapeCount
long tileGetShapeCount(long id)

Returns the number of shapes assigned to a tile.

tileGetShapeOffset
Vector2 tileGetShapeOffset(long id, long shape_id)

Returns the offset of a tile's shape.

tileGetShapeOneWay
bool tileGetShapeOneWay(long id, long shape_id)

Returns the one-way collision value of a tile's shape.

tileGetShapeTransform
Transform2D tileGetShapeTransform(long id, long shape_id)

Returns the Transform2D of a tile's shape.

tileGetShapes
Array tileGetShapes(long id)

Returns an array of the tile's shapes.

tileGetTexture
Ref!Texture tileGetTexture(long id)

Returns the tile's texture.

tileGetTextureOffset
Vector2 tileGetTextureOffset(long id)

Returns the texture offset of the tile.

tileGetTileMode
TileSet.TileMode tileGetTileMode(long id)

Returns the tile's tilemode.

tileGetZIndex
long tileGetZIndex(long id)

Returns the tile's z-index (drawing layer).

tileSetLightOccluder
void tileSetLightOccluder(long id, OccluderPolygon2D light_occluder)

Sets a light occluder for the tile.

tileSetMaterial
void tileSetMaterial(long id, ShaderMaterial material)

Sets the tile's material.

tileSetModulate
void tileSetModulate(long id, Color color)

Sets the tile's modulation color.

tileSetName
void tileSetName(long id, StringArg1 name)

Sets the tile's name.

tileSetNavigationPolygon
void tileSetNavigationPolygon(long id, NavigationPolygon navigation_polygon)

Sets the tile's navigation polygon.

tileSetNavigationPolygonOffset
void tileSetNavigationPolygonOffset(long id, Vector2 navigation_polygon_offset)

Sets an offset for the tile's navigation polygon.

tileSetNormalMap
void tileSetNormalMap(long id, Texture normal_map)

Sets the tile's normal map texture.

tileSetOccluderOffset
void tileSetOccluderOffset(long id, Vector2 occluder_offset)

Sets an offset for the tile's light occluder.

tileSetRegion
void tileSetRegion(long id, Rect2 region)

Sets the tile's sub-region in the texture. This is common in texture atlases.

tileSetShape
void tileSetShape(long id, long shape_id, Shape2D shape)

Sets a shape for the tile, enabling collision.

tileSetShapeOffset
void tileSetShapeOffset(long id, long shape_id, Vector2 shape_offset)

Sets the offset of a tile's shape.

tileSetShapeOneWay
void tileSetShapeOneWay(long id, long shape_id, bool one_way)

Enables one-way collision on a tile's shape.

tileSetShapeTransform
void tileSetShapeTransform(long id, long shape_id, Transform2D shape_transform)

Sets a Transform2D on a tile's shape.

tileSetShapes
void tileSetShapes(long id, Array shapes)

Sets an array of shapes for the tile, enabling collision.

tileSetTexture
void tileSetTexture(long id, Texture texture)

Sets the tile's texture.

tileSetTextureOffset
void tileSetTextureOffset(long id, Vector2 texture_offset)

Sets the tile's texture offset.

tileSetTileMode
void tileSetTileMode(long id, long tilemode)

Sets the tile's tilemode.

tileSetZIndex
void tileSetZIndex(long id, long z_index)

Sets the tile's drawing index.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
TileSet _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta