Refactor rhythm action architecture

This commit is contained in:
wxm
2026-07-02 09:47:52 -07:00
parent fc941cf08d
commit e62ed84518
124 changed files with 7516 additions and 2440 deletions

17
resources/chart_track.gd Normal file
View File

@@ -0,0 +1,17 @@
class_name ChartTrack
extends Resource
@export var track_id: StringName = &""
@export var track_type: StringName = &""
@export var events: Array = []
func sorted_events() -> Array:
var result: Array = []
for event in events:
if event is Resource:
result.append(event)
result.sort_custom(func(a: Resource, b: Resource) -> bool:
return float(a.call("beat_position")) < float(b.call("beat_position"))
)
return result