summaryrefslogtreecommitdiffstats
path: root/map.gd
diff options
context:
space:
mode:
Diffstat (limited to 'map.gd')
-rw-r--r--map.gd19
1 files changed, 19 insertions, 0 deletions
diff --git a/map.gd b/map.gd
new file mode 100644
index 0000000..478a5f3
--- /dev/null
+++ b/map.gd
@@ -0,0 +1,19 @@
+class_name Map
+extends CanvasLayer
+
+var active_map_room: MapRoom
+
+@export var inactive_color: Color
+@export var active_color: Color
+
+func set_active_name(map_room_name: String):
+ if active_map_room:
+ active_map_room.color = inactive_color
+
+ if has_node(map_room_name):
+ active_map_room = get_node(map_room_name)
+ else:
+ active_map_room = null
+
+ if active_map_room:
+ active_map_room.color = active_color