extends Area3D

@onready var door_animation: AnimationPlayer = %DoorAnimation
@onready var open_sfx: AudioStreamPlayer3D = %OpenSFX
@onready var close_sfx: AudioStreamPlayer3D = %CloseSFX


func _on_body_entered(_body: Node3D) -> void:
	door_animation.play("open")
	open_sfx.play()


func _on_body_exited(_body: Node3D) -> void:
	door_animation.play_backwards("open")
	close_sfx.play()
