extends StaticBody2D

onready var signal_manager := get_tree().root.get_child(4).get_node("%SignalManager")
onready var level_state := get_tree().root.get_child(4).get_node("%LevelState")

export var locked := true

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	signal_manager.connect("unlocked", self, "unlock")
	# if locked:
	# 	$CollisionShape2D.enabled = true
	# 	visible = true


func unlock(key: String) -> void:
	if key.to_lower() == "gateblock":
		$BlockShape.disabled = true
		collision_layer = 0
		visible = false


