Files
godot-4-key-rhythm-game/rhythm_game/note/visual/tap/tap_note.gd

17 lines
291 B
GDScript3
Raw Normal View History

class_name TapNote extends NoteVisual
2026-02-04 00:03:12 +08:00
var hit_beat: float = -999.0
2026-02-04 00:03:12 +08:00
var id: int = -1
2026-02-01 23:14:52 +08:00
func reset() -> void:
id = -1
2026-02-04 00:03:12 +08:00
hit_beat = -999.0
position = Vector2(0, 9999.0)
func in_use() -> bool:
return id >= 0
2026-02-01 23:14:52 +08:00
func update(beat: float) -> void:
2026-02-04 00:03:12 +08:00
position.y = _calculate_scroll(hit_beat, beat)