Implement note spawner.

This commit is contained in:
2026-02-01 23:17:51 +08:00
parent 3a9d3046b2
commit 7bc4246375
8 changed files with 151 additions and 75 deletions

View File

@@ -15,9 +15,21 @@ class_name NotePool extends Node
@export var hold_skin: StringName = "default"
func get_note(type: NoteVisual.TYPE) -> NoteVisual:
var note: NoteVisual
# TODO: Implement.
return note
match type:
NoteVisual.TYPE.TAP:
return get_tap()
NoteVisual.TYPE.HOLD:
return get_hold()
_:
return null
func return_note(note: NoteVisual) -> void:
if note is TapNote:
note.reset()
return_tap(note as TapNote)
elif note is HoldNote:
note.reset()
return_hold(note as HoldNote)
## Get a tap note. Instantiates one if no free nodes are available.
func get_tap() -> TapNote: