extends AudioStreamPlayer

@export var music : Array[AudioStream];

func skip_music():
	var piece = music[randi_range(0, music.size() - 1)];
	stream = piece;
	play()

func _ready() -> void:
	skip_music()

func _on_finished() -> void:
	skip_music()

func _process(_delta: float) -> void:
	if Input.is_action_just_pressed(("skip_music")):
		skip_music()
