feat: music callback

This commit is contained in:
2026-04-16 11:52:55 +08:00
parent 0460090e25
commit a4e6e6eccb
5 changed files with 8 additions and 14 deletions
@@ -29,7 +29,6 @@ namespace OCES.Audio
// ─────────────────────────────────────────────
public event Action<uint> OnBeat;
public event Action<uint> OnBar;
public event Action<uint> OnGrid;
@@ -196,10 +195,13 @@ namespace OCES.Audio
EnumIds.RegisterAllGameState();
ActiveStates = new Dictionary<Type, Enum>();
}
void Start()
{
// ── 启动默认音乐与环境音 ──
// 触发一次初始状态,让音乐系统从默认状态开始匹配
//SetState(GameState.Home);
SetState(GameState.Home);
}
AudioObject ResolveSwitchContainer(AudioObject switchContainer)