自动化注册GroupState
This commit is contained in:
@@ -8,6 +8,13 @@ namespace OCES.Audio
|
||||
public static class EnumIds
|
||||
{
|
||||
public const uint GameState = 1;
|
||||
|
||||
public const uint TestEnum = 2;
|
||||
|
||||
public static void RegisterAllGameState()
|
||||
{
|
||||
StateGroupRegistry.Register<GameState>(1);
|
||||
StateGroupRegistry.Register<TestEnum>(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,11 +105,7 @@ namespace OCES.Audio
|
||||
ambiencePool);
|
||||
|
||||
// ── 注册 StateGroup ──
|
||||
// 在此处注册所有游戏状态 enum,TypeId 需与策划表中填写的数字一致
|
||||
// 示例(请根据实际 enum 修改):
|
||||
// StateGroupRegistry.Register<GameState>(1);
|
||||
// StateGroupRegistry.Register<Theme>(2);
|
||||
StateGroupRegistry.Register<GameState>(1);
|
||||
EnumIds.RegisterAllGameState();
|
||||
|
||||
// ── 启动默认音乐与环境音 ──
|
||||
// 触发一次初始状态,让音乐系统从默认状态开始匹配
|
||||
|
||||
Reference in New Issue
Block a user