20 lines
491 B
GDScript
20 lines
491 B
GDScript
## Gets a range of notes in a NoteData relative to a current beat.
|
|
class_name NoteView extends View
|
|
|
|
## The full set of notes.
|
|
@export var notes: NoteArray = null: set = _set_notes
|
|
|
|
## Get the array this NoteView refers to.
|
|
func get_data() -> NoteArray:
|
|
return notes
|
|
|
|
func update_current_beat(beat: float) -> void:
|
|
_current_beat = beat
|
|
_update_view_relative_to_notes(notes)
|
|
|
|
# ======= IMPLEMENTATION ======= #
|
|
|
|
func _set_notes(p_notes: NoteArray) -> void:
|
|
notes = p_notes
|
|
_reset_view()
|