extends Node2D


# Declare member variables here. Examples:
# var a: int = 2
# var b: String = "text"
export var is_locked = true


func _ready() -> void:
	$Area2D.remove_from_group("harmful")
	$Sprite/AnimationPlayer.play("locked")


func _on_Area2D_area_exited(area: Area2D) -> void:
	$Timer.start()


func _on_Timer_timeout() -> void:
	is_locked = true
	$Area2D.add_to_group("harmful")
	$Sprite/AnimationPlayer.play("unlocked")
