feat: add a switch for the hidden door; connect it and toggle via signals;

This commit is contained in:
2026-09-20 15:31:24 +02:00
parent c429e2c461
commit d8d342ab56
2 changed files with 18 additions and 3 deletions
+12 -3
View File
@@ -1,8 +1,17 @@
extends TileMapLayer
func _ready() -> void:
disable_secret_door()
func disable_secret_door():
visible = false
collision_enabled = false
func enable_secret_door():
visible = true
collision_enabled = true
func _on_switch_switch_activated() -> void:
disable_secret_door()
func _on_switch_switch_deactivated() -> void:
enable_secret_door()