extends Node3D

var collected: bool = false

func _ready():
	$AnimationPlayer.play("idle")
	$AnimationPlayer.seek(randf_range(0, $AnimationPlayer.current_animation_length))

func _on_area_3d_body_entered(_body:Node3D):
	if (collected):
		return
	collected = true
	Signals.emit_signal("MoneyCollected", 1)
	queue_free()
