#@tool
#@icon(icon_path: String)
class_name Musician
extends AnimatedSprite2D
## Documentation comments

# signal
# enum
# const
# @export var
var is_active: bool = false

@onready var audio: AudioStreamPlayer2D = $Audio
@onready var light: PointLight2D = $Light
@onready var occluder: LightOccluder2D = $Occluder

## OVERRIDES

func _ready() -> void:
	light.visible = false
	audio.connect("finished", enter_exit)

func _process(_delta: float) -> void:
	pass

func _physics_process(_delta: float) -> void:
	pass

## CORE
func enter_exit() -> void:
	if is_active:
		play("idle")
		audio.stop()
		light.visible = false
		is_active = false
	else:
		play("default")
		audio.play()
		light.visible = true
		is_active = true

## PRIVATE/HELPER

## RECEIVERS

## SETTERS/GETTERS
