Initial commit. Implement music sync features.

This commit is contained in:
2026-01-19 22:48:17 +08:00
commit f16cf0fb96
37 changed files with 757 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
class_name BeatUpdate
## Beat this frame.
var current: float
## Beat last frame.
var previous: float
## Beat updated forward in time.
func forward() -> bool:
return current > previous
## Beat updated backward in time.
func backward() -> bool:
return current < previous
func new_beat() -> bool:
return floori(previous) != floori(current)
func _init(current_beat: float = 0.0, previous_beat: float = 0.0) -> void:
current = current_beat
previous = previous_beat