class_name Puzzle
extends Node

@onready var sfx = preload("res://scenes/assets/jingles/win.wav")
@onready var audio_player: AudioStreamPlayer2D = get_tree().root.get_child(0).get_node("Player/AudioStreamPlayer2D")

signal complete_puzzle

var is_complete = false;

func complete():
	if is_complete:
		return
	
	is_complete = true
	
	audio_player.stream = sfx
	audio_player.play()
	complete_puzzle.emit()
