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
| Name | Description | Type |
|---|---|---|
background_color | Map background color. | Color |
bounds | Map bounds in pixels. | Rect |
hex_side_length | Hex side length for hex maps. | float |
layers | LayerList of layers in the map. | list[Layer] |
map_size | Map dimensions in tiles. | Vec2 |
orientation | Map orientation enum. | MapOrientation |
render_order | Tile render order enum. | MapRenderOrder |
stagger_axis | Stagger axis enum for staggered/hex maps. | MapStaggerAxis |
stagger_index | Stagger index enum for staggered/hex maps. | MapStaggerIndex |
tile_sets | TileSetList of tilesets used by the map. | list[TileSet] |
tile_size | Size of tiles in pixels. | Vec2 |
Methods
Draw
draw() → NoneDraw all layers.
Load
load(tmx_path: str) → NoneLoad a TMX file from path.
Args
tmx_path: Path to the TMX file to load.