extends Node3D

@export var campfire_lit: bool = false
@export var fire_particles: GPUParticles3D
@export var smoke_particles: GPUParticles3D
@export var audio_stream_player_3d: AudioStreamPlayer3D
@export var sfx_files: Array[AudioStreamWAV] = []


func _ready() -> void:
	audio_stream_player_3d.finished.connect(play_random_sfx)
	play_random_sfx()


func light_campfire():
	fire_particles.emitting = true
	smoke_particles.emitting = true


func play_random_sfx():
	audio_stream_player_3d.stream = sfx_files.pick_random()
	audio_stream_player_3d.play()
