Files
godot-4-key-rhythm-game/rhythm_game/note/view/note_view.gd

20 lines
491 B
GDScript3
Raw Normal View History

2026-01-25 03:26:34 +08:00
## 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()