extends StaticBody2D

var unlocked = false

signal player_entered_castle

func _ready():
	pass # Replace with function body.

func _on_Unlock(body):
	if GlobalState.keys['blue'] == true:
		$DoorSprite.play("open")
		unlocked = true


func _on_entered_castle(body):
	if unlocked == true:
		emit_signal("player_entered_castle")
