Map

A TMX map with access to its layers and tilesets. Access via the 'tilemap' submodule.

Constructor

  • Map() Map

A TMX map with access to its layers and tilesets.

Properties


NameDescriptionType
background_colorMap background color.Color
boundsMap bounds in pixels.Rect
hex_side_lengthHex side length for hex maps.float
layersLayerList of layers in the map.list[Layer]
map_sizeMap dimensions in tiles.Vec2
orientationMap orientation enum.MapOrientation
render_orderTile render order enum.MapRenderOrder
stagger_axisStagger axis enum for staggered/hex maps.MapStaggerAxis
stagger_indexStagger index enum for staggered/hex maps.MapStaggerIndex
tile_setsTileSetList of tilesets used by the map.list[TileSet]
tile_sizeSize of tiles in pixels.Vec2

Methods


Draw

draw() None

Draw all layers.

Load

load(tmx_path: str) None

Load a TMX file from path.

Args

  • tmx_path : Path to the TMX file to load.