Mapο
Inherits: Node2D
Overworld room selection tree.
Displays a procedurally generated grid of MapRoom nodes representing a 16-floor roguelike progression. Uses MapGenerator to produce the Room data grid, then spawns MapRoom nodes connected by Line2D paths.
Propertiesο
|
|
Array[ |
|
|
|
|
|
|
Methodsο
void |
|
void |
|
void |
unlock_floor(which_floor: |
void |
|
void |
_on_map_room_selected(room: |
Property Descriptionsο
Camera2D camera_2d π
Vertical scrolling camera.
Array[Array] map_data π
2D grid of Room data objects from MapGenerator.
int floor_climbed π
Number of floors the player has progressed through.
Room last_room π
The most recently selected Room.
float camera_edge_y π
Upper Y clamp for camera scroll: Y_DIST * (FLOOR - 1).
Method Descriptionsο
void generate_new_map() π
Generates a new set of rooms via MapGenerator and builds the visual map.
void create_map() π
Spawns MapRoom nodes for all rooms with outgoing connections, plus the boss room at the top floor. Centers visuals on screen.
void unlock_floor(which_floor: int = floor_climbed) π
Sets MapRoom.available on all rooms in which_floor.
void unlock_next_rooms() π
Sets MapRoom.available on rooms connected to last_room.
void _on_map_room_selected(room: Room) π
Locks all rooms on the selected roomβs floor, records it, increments floor_climbed, and unlocks connected rooms on the next floor.