MapRoom

Inherits: Area2D

Visual node for a room on the overworld map.

Properties

bool

available

false

Room

room

Methods

void

show_selected()

void

_on_input_event(_viewport: Node, event: InputEvent, _shape_idx: int)

void

_on_map_node_selected()


Signals

selected(room: Room) πŸ”—

Emitted after the β€œselect” animation finishes.


Constants

ICONS = {0: [null, Vector2(1, 1)], 1: [<Object>, Vector2(1, 1)], 2: [<Object>, Vector2(2, 2)], 3: [<Object>, Vector2(1, 1)], 4: [<Object>, Vector2(1, 1)], 5: [<Object>, Vector2(1, 1)]} πŸ”—

Maps each Room.Type to icon [Texture2D, Vector2 scale].


Property Descriptions

bool available = false πŸ”—

  • void set_available(value: bool)

Whether the room is clickable.


Room room πŸ”—

  • void set_room(value: Room)

The Room data object this node represents. Sets position, icon, and line rotation.


Method Descriptions

void show_selected() πŸ”—

Marks the room as already-selected by turning its outline white.


void _on_input_event(_viewport: Node, event: InputEvent, _shape_idx: int) πŸ”—

On left-click if available: marks room selected and plays β€œselect” animation.


void _on_map_node_selected() πŸ”—

Called by the β€œselect” animation. Emits selected.