feat: add a switch for the hidden door; connect it and toggle via signals;
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user