TileLayer

TileLayer represents a grid of tiles within the map. Access via the 'tilemap' submodule.

Inherits from Layer.

Properties


NameDescriptionType
opacityLayer opacity from 0.0 to 1.0.float
tilesTileLayerTileList of tiles in the layer grid.list[TileLayer.Tile]

Methods


Draw

draw() None

Draw the tile layer.

Get From Area

get_from_area(area: Rect) list[TileLayer.TileResult]

Return tiles intersecting a Rect area.

Args

  • area : World-space area to query.

Returns

list[TileLayer.TileResult] : List of TileResult entries for tiles intersecting the area.

Get From Point

get_from_point(position: Vec2) Any

Return the tile at a given world position.

Args

  • position : World-space position to query.

Returns

Optional[TileLayer.TileResult] : TileResult entry if a tile exists at the position, None otherwise.