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,25 @@
class_name EventLayout extends Node
#var _beats: Array[float]
#var _callables: Array[Callable]
#var _index: int = 0
### Schedule the callable to be called on the specified beat.
#func schedule(beat: float, callable: Callable) -> void:
#var i := schedule_beats.find_custom(func(s_beat: float): return s_beat > beat )
#if i == -1:
#i = schedule_beats.size()
#schedule_beats.insert(i, beat)
#schedule_callables.insert(i, callable)
#
### Clears all scheduled callables.
#func reset_schedule() -> void:
#schedule_beats.clear()
#schedule_callables.clear()
#schedule_index = 0
#
#while(schedule_index < schedule_beats.size()
#and get_beat() >= schedule_beats.get(schedule_index)):
#schedule_callables.get(schedule_index).call()
#schedule_index += 1