TileMap

A Tiled map containing multiple layers of tiles.

  • TileMap(tmx_path: str, border_size: int = 0)

Methods


Get Layer

get_layer(name: str, type: Layer.Type = Layer.TILE) Layer

Get a layer object from the tile map by name and type.

Returns Layer : The layer object with the specified name and type.

Get Layers

get_layers() list[Layer]

Get all layers in the tile map.

Returns list[Layer] : A list of all layers in the tile map.

Get Tile Collection

get_tile_collection(layers: Sequence[Layer]) list[Tile]

Get all tiles from the specified layers.

Returns list[Tile] : A list of all tiles from the specified layers.