TileLayer
TileLayer represents a grid of tiles within the map. Access via the 'tilemap' submodule.
Inherits from Layer.
Properties
| Name | Description | Type |
|---|---|---|
opacity | Layer opacity from 0.0 to 1.0. | float |
tiles | TileLayerTileList of tiles in the layer grid. | list[TileLayer.Tile] |
Methods
Draw
draw() → NoneDraw 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) → AnyReturn 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.