extends Area3D
var Esferauno = preload("res://SONIDO/solosuena.tscn")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass
func _on_area_entered(area: Area3D) -> void:
	
	#var parent = get_parent()
	#var CollisionShape3Dcubo = parent.get_node("CollisionShape3D")
	var Esferauno = Esferauno.instantiate()
	add_child(Esferauno)
	#get_node("CollisionShape3D").queue_free()
	
	#get_node("LADRON VESTIDO4 ANIMO ESTE-3-").queue_free()
	
	pass # Replace with function body.
func _on_area_exited(area: Area3D) -> void:
	
	
	var Esferauno = Esferauno.instantiate()
	add_child(Esferauno)
	
	pass # Replace with function body.
---------------------------------------------------------------------------------------------------------------------
-------------------------------------------el sonido se borra a los 3 segundos, una vez instanciado, cuando vuelve a instanciarse se vuelve a escuchar----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
extends Node3D
# Variable para almacenar el tiempo transcurrido
var tiempo_transcurrido = 0.0
func _process(delta):
	# Sumamos el tiempo transcurrido en cada frame
	tiempo_transcurrido += delta
	# Si el tiempo transcurrido es mayor o igual a 5 segundos, eliminamos el label
	if tiempo_transcurrido >= 3.0:
		queue_free()