class_name ScoreArray extends Node

## The note array this score refers to.
## WARNING: Changing the note data clears all scores.
var notes: NoteArray: set = _set_notes

## Set a score for the note at [param index] in [member notes].
## [param offset] is how off the note hit was in seconds.
func set_score(index: int, offset: float) -> void:
	_scores.set(index, offset)


# ======== IMPLEMENTATION ======== #
var _scores: Array[float]

func _set_notes(p_notes: NoteArray) -> void:
	if notes == p_notes:
		return
	notes = p_notes
	_scores.clear()
	_scores.resize(notes.size())
