From c87a5a1e309404d8990d1d0314ef968b81e8539a Mon Sep 17 00:00:00 2001 From: Oliver Wong Date: Fri, 17 Apr 2026 16:00:19 +0800 Subject: [PATCH] refactor(audio): restructure audio constants and remove deprecated files - Add AudioConsts.cs with Cues, NameDictionaries, and Parameters classes - Remove AudioEnumIds.cs, AudioEnums.cs, and AudioObjectDefinitions.cs - Update AudioObject.cs to include CueName property and serialization - Update AudioSystem.cs to use new NameDictionaries and Parameters classes - Update SetStateBind.cs to use Parameters.GameState type - Change UI text from "PlaySound" to "StopSound" in SampleScene.unity - Update binary audio data file AudioObject.bytes --- Assets/Resources/AudioData/AudioObject.bytes | Bin 6605 -> 7502 bytes Assets/Scenes/SampleScene.unity | 2 +- .../OCES/Audio/Generated/AudioConsts.cs | 275 ++++++++++++++++++ ...efinitions.cs.meta => AudioConsts.cs.meta} | 2 +- .../OCES/Audio/Generated/AudioEnumIds.cs | 20 -- .../OCES/Audio/Generated/AudioEnumIds.cs.meta | 11 - .../OCES/Audio/Generated/AudioEnums.cs | 25 -- .../OCES/Audio/Generated/AudioEnums.cs.meta | 11 - .../OCES/Audio/Generated/AudioObject.cs | 7 + .../Audio/Generated/AudioObjectDefinitions.cs | 165 ----------- .../OCES/Audio/HandWritten/AudioSystem.cs | 10 +- Assets/Scripts/OCES/SetStateBind.cs | 2 +- 12 files changed, 290 insertions(+), 240 deletions(-) create mode 100644 Assets/Scripts/OCES/Audio/Generated/AudioConsts.cs rename Assets/Scripts/OCES/Audio/Generated/{AudioObjectDefinitions.cs.meta => AudioConsts.cs.meta} (83%) delete mode 100644 Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs delete mode 100644 Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs.meta delete mode 100644 Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs delete mode 100644 Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs.meta delete mode 100644 Assets/Scripts/OCES/Audio/Generated/AudioObjectDefinitions.cs diff --git a/Assets/Resources/AudioData/AudioObject.bytes b/Assets/Resources/AudioData/AudioObject.bytes index 5199504e49493b25be680c9afb43d5ade9d98d72..9cce3ff04c61655cdfb0b85cdbad4a5b3f077253 100644 GIT binary patch delta 1173 zcmZ9KOKcle6o%vYF>l-BM`%H!Z9qs=DUdEkGyivH{(I&>=gW<+ zo?mG!EiJ|PWt0h?RjB7-A5(HHHw`@`UD`*^0SCLAs#0c*-mGDUj&Ik}hDDDo)IlC{ z12j7RiGRS!zYg$ttS3vHY|}#ouf*Dl%te>Z-3fdh+tM|mB6E0XxvOiHi9^PS8&C#x z`9%&q>`twD5Ksc2FL!0BLNTd%3n;|fX`|}QoH4Q%qA3`~o0;@IWX(Mf1#l<6mCxN{ z6^9T?EXVWUkNA$1s-k`51kgxSG_{KSfYAl-2wqRrb7mDCVy_$ojyvs4F!Dz5ZDOEn z0wW7GZ~)usCt;9mDYAf7jNpUhRaFrxObC8W)=rIfkw0gQr^IuGjZ};G#GElDXAXEZ zb)6p|cyz$`sRp+bAauVZ)p(ym3j48ChfkzD+>v&2W_?2a;Edg0(m+!Mj@9tJbztaihKY-Oze;ZsxTW^~BQ@kO_$DM#wicsPMBq`amop>MBO}D3-+`C4my(Ij z0VeRBwyi2%JVs0$ds*j!^oU2@X`9glnCcxvk90STJAk|TrY!AYH=t|*lF`m)qHVi+ zG;!uW-&yDz*EKbQB8ZQTjv|+5LyUOuu$K$ASxU9`s+c!vn-xQE?KOC)!H~b^!~5nY{ARAfFQ(1!7ZL%U zAuiTnmU|&~5sr%w!j)nQKFsxFt6Z&~9*SL za@IX|Fhq{8Vw`hP(e5zS^wD^u0dg!M8j`X@<_ zb(4GDrY$tYddT5VsLb0JSe#u&C|ydAoH(pch5p-t!o<**`9%rhv=~j4j4Ubh z4R=PrtTUXLlf1Jg*^|;^b1cUexQxxx72jv(Wh0fOhLPCv`(#!#J7$uHM3BqGcS)-> QBu}|b9 NameToId = new() + { + { "AnimCollision", 1 }, + { "AnimToWeapon", 2 }, + { "ArrowFire", 3 }, + { "BoxBeSelected", 4 }, + { "BoxCollision", 5 }, + { "BoxMove", 6 }, + { "BoxTouch", 7 }, + { "BoxToWeapon", 8 }, + { "ChangeColor", 9 }, + { "ClickButton", 10 }, + { "CoinFly", 11 }, + { "DamageByArrow", 12 }, + { "DamageByBullet", 13 }, + { "DamageByCannonBall", 14 }, + { "Defeat", 15 }, + { "DestroyBox", 16 }, + { "DevilAttackShield", 17 }, + { "DevilBeHit_01", 18 }, + { "DevilBeHit_02", 18 }, + { "DevilBeHit_03", 18 }, + { "DevilDie", 19 }, + { "DevilFire", 20 }, + { "DevilResurrection", 21 }, + { "DragonAttackShield", 22 }, + { "DragonBeHit", 23 }, + { "DragonDie", 24 }, + { "DragonFire", 25 }, + { "DragonResurrection", 26 }, + { "GhostAttackShield", 27 }, + { "GhostBeHit", 28 }, + { "GhostDie", 29 }, + { "GhostFire", 30 }, + { "GhostResurrection", 31 }, + { "GunFire", 32 }, + { "HorseMove", 33 }, + { "LevelBegins", 34 }, + { "PrincessDown", 35 }, + { "PrincessFear", 36 }, + { "ShieldBroken", 37 }, + { "ShieldUnderAttack", 38 }, + { "Spin", 39 }, + { "TigerMove", 40 }, + { "UnlockProp", 41 }, + { "UnlockTurret", 42 }, + { "Victory", 43 }, + { "WeaponExhausted", 44 }, + { "WeaponFire", 45 }, + { "au_stream", 46 }, + { "rain", 46 }, + { "Chinese Number 01", 48 }, + { "Chinese Number 02", 48 }, + { "Chinese Number 03", 48 }, + { "Chinese Number 04", 48 }, + { "Chinese Number 05", 48 }, + { "Chinese Number 06", 49 }, + { "Chinese Number 07", 49 }, + { "Chinese Number 08", 49 }, + { "Chinese Number 09", 49 }, + { "Chinese Number 10", 49 }, + { "Japanese Number 02", 51 }, + { "Bar", 52 }, + { "Beat", 53 }, + { "Grid", 54 }, + { "NVDice", 55 }, + { "NVHeartbeats", 56 }, + { "au_sfx_notice_level_countDown_edge", 57 }, + { "au_sfx_notice_level_countDown_time", 58 }, + { "0,62", 59 }, + { "1,65", 59 }, + { "2,68", 59 }, + { "0,63", 60 }, + { "1,66", 60 }, + { "2,69", 60 }, + { "0,64", 61 }, + { "1,67", 61 }, + { "2,70", 61 }, + { "au_coreplay_choose_v120_a", 62 }, + { "au_coreplay_unchoose_v120_a", 63 }, + { "au_coreplay_clear_v120_a", 64 }, + { "au_sfx_ui_button_corePlay_choose_ice1", 65 }, + { "au_sfx_ui_button_corePlay_choose_ice2", 65 }, + { "au_sfx_ui_button_corePlay_choose_ice3", 65 }, + { "au_sfx_ui_button_corePlay_unchoose_ice1", 66 }, + { "au_sfx_ui_button_corePlay_unchoose_ice2", 66 }, + { "au_sfx_ui_button_corePlay_unchoose_ice3", 66 }, + { "au_sfx_ui_button_corePlay_clear_ice1", 67 }, + { "au_sfx_ui_button_corePlay_clear_ice2", 67 }, + { "au_sfx_ui_button_corePlay_clear_ice3", 67 }, + { "au_sfx_ui_button_corePlay_choose_cloud1", 68 }, + { "au_sfx_ui_button_corePlay_choose_cloud2", 68 }, + { "au_sfx_ui_button_corePlay_choose_cloud3", 68 }, + { "au_sfx_ui_button_corePlay_unchoose_cloud1", 69 }, + { "au_sfx_ui_button_corePlay_unchoose_cloud2", 69 }, + { "au_sfx_ui_button_corePlay_unchoose_cloud3", 69 }, + { "au_sfx_ui_button_corePlay_clear_cloud1", 70 }, + { "au_sfx_ui_button_corePlay_clear_cloud2", 70 }, + { "au_sfx_ui_button_corePlay_clear_cloud3", 70 }, + { "sfx_notice_test", 71 }, + { "Spanish Number 03", 73 }, + }; + + public static readonly HashSet AmbiguousNames = new() + { + "DevilBeHit_01", + "DevilBeHit_02", + "DevilBeHit_03", + "Chinese Number 01", + }; + + public static readonly HashSet SharedIdNames = new() + { + "DevilBeHit_01", + "DevilBeHit_02", + "DevilBeHit_03", + "au_stream", + "rain", + "Chinese Number 01", + "Chinese Number 02", + "Chinese Number 03", + "Chinese Number 04", + "Chinese Number 05", + "Chinese Number 06", + "Chinese Number 07", + "Chinese Number 08", + "Chinese Number 09", + "Chinese Number 10", + "0,62", + "1,65", + "2,68", + "0,63", + "1,66", + "2,69", + "0,64", + "1,67", + "2,70", + "au_sfx_ui_button_corePlay_choose_ice1", + "au_sfx_ui_button_corePlay_choose_ice2", + "au_sfx_ui_button_corePlay_choose_ice3", + "au_sfx_ui_button_corePlay_unchoose_ice1", + "au_sfx_ui_button_corePlay_unchoose_ice2", + "au_sfx_ui_button_corePlay_unchoose_ice3", + "au_sfx_ui_button_corePlay_clear_ice1", + "au_sfx_ui_button_corePlay_clear_ice2", + "au_sfx_ui_button_corePlay_clear_ice3", + "au_sfx_ui_button_corePlay_choose_cloud1", + "au_sfx_ui_button_corePlay_choose_cloud2", + "au_sfx_ui_button_corePlay_choose_cloud3", + "au_sfx_ui_button_corePlay_unchoose_cloud1", + "au_sfx_ui_button_corePlay_unchoose_cloud2", + "au_sfx_ui_button_corePlay_unchoose_cloud3", + "au_sfx_ui_button_corePlay_clear_cloud1", + "au_sfx_ui_button_corePlay_clear_cloud2", + "au_sfx_ui_button_corePlay_clear_cloud3", + }; + } //public class NameDictionaries + + [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] + public class Parameters + { + public static class EnumIds + { + public const uint GameStateId = 1; + + public const uint TileMaterialId = 2; + + + public static void RegisterAllGameState() + { + StateGroupRegistry.Register(1); + StateGroupRegistry.Register(2); + } + } + + public enum GameState + { + Home, // 主界面 + Game, // 关卡内 + Win, // 胜利 + Lose, // 失败 + Guitar = 5, // 测试用值- guitar + Bass = 6, // 测试用值 + } + + public enum TileMaterial + { + Normal, // 普通牌 + Ice, // 冰 + Cloud, // 云 + } + + } //public class Parameters +} diff --git a/Assets/Scripts/OCES/Audio/Generated/AudioObjectDefinitions.cs.meta b/Assets/Scripts/OCES/Audio/Generated/AudioConsts.cs.meta similarity index 83% rename from Assets/Scripts/OCES/Audio/Generated/AudioObjectDefinitions.cs.meta rename to Assets/Scripts/OCES/Audio/Generated/AudioConsts.cs.meta index 4b1965a..89f96ce 100644 --- a/Assets/Scripts/OCES/Audio/Generated/AudioObjectDefinitions.cs.meta +++ b/Assets/Scripts/OCES/Audio/Generated/AudioConsts.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 524b2a6c9b0c412a8979b5a28b1247b9 +guid: 503d01a2b3a224616bbb6d60c6e1fe5a MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs b/Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs deleted file mode 100644 index decab45..0000000 --- a/Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs +++ /dev/null @@ -1,20 +0,0 @@ -/* - * auto generated by tools(注意:千万不要手动修改本文件) - * EnumIds - */ - -namespace OCES.Audio -{ - public static class EnumIds - { - public const uint GameState = 1; - - public const uint TileMaterial = 2; - - public static void RegisterAllGameState() - { - StateGroupRegistry.Register(1); - StateGroupRegistry.Register(2); - } - } -} diff --git a/Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs.meta b/Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs.meta deleted file mode 100644 index 0847c7a..0000000 --- a/Assets/Scripts/OCES/Audio/Generated/AudioEnumIds.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 078657a38322544089b74cbebaf91502 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs b/Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs deleted file mode 100644 index 60dc6e3..0000000 --- a/Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs +++ /dev/null @@ -1,25 +0,0 @@ -/* - * auto generated by tools(注意:千万不要手动修改本文件) - * AudioEnums - */ - -namespace OCES.Audio -{ - public enum GameState - { - Home, // 主界面 - Game, // 关卡内 - Win, // 胜利 - Lose, // 失败 - Guitar = 5, // 测试用值- guitar - Bass = 6, // 测试用值 - } - - public enum TileMaterial - { - Normal, // 普通牌 - Ice, // 冰 - Cloud, // 云 - } - -} diff --git a/Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs.meta b/Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs.meta deleted file mode 100644 index b433903..0000000 --- a/Assets/Scripts/OCES/Audio/Generated/AudioEnums.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 90dde7791314b42059a7b6b9539333c3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/OCES/Audio/Generated/AudioObject.cs b/Assets/Scripts/OCES/Audio/Generated/AudioObject.cs index 9989e95..91867ae 100644 --- a/Assets/Scripts/OCES/Audio/Generated/AudioObject.cs +++ b/Assets/Scripts/OCES/Audio/Generated/AudioObject.cs @@ -17,6 +17,11 @@ public partial class AudioObject : IBinarySerializable /// public uint Id { get; set; } + /// + /// + /// + public string CueName { get; set; } + /// /// 文件名 /// @@ -150,6 +155,7 @@ public partial class AudioObject : IBinarySerializable public void DeSerialize(BinaryReader reader) { Id = reader.ReadUInt32(); + CueName = reader.ReadString(); var nameCount = reader.ReadInt32(); if (nameCount > 0) { @@ -190,6 +196,7 @@ public partial class AudioObject : IBinarySerializable public void Serialize(BinaryWriter writer) { writer.Write(Id); + writer.Write(CueName); if (Name == null || Name.Count == 0) { writer.Write(0); diff --git a/Assets/Scripts/OCES/Audio/Generated/AudioObjectDefinitions.cs b/Assets/Scripts/OCES/Audio/Generated/AudioObjectDefinitions.cs deleted file mode 100644 index 8aea295..0000000 --- a/Assets/Scripts/OCES/Audio/Generated/AudioObjectDefinitions.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* auto generated, do not modify */ -using System.Collections.Generic; - -namespace OCES.Audio -{ -public static class AudioObjectDefinitions -{ - public static readonly Dictionary NameToId = new() - { - { "AnimCollision", 1 }, - { "AnimToWeapon", 2 }, - { "ArrowFire", 3 }, - { "BoxBeSelected", 4 }, - { "BoxCollision", 5 }, - { "BoxMove", 6 }, - { "BoxTouch", 7 }, - { "BoxToWeapon", 8 }, - { "ChangeColor", 9 }, - { "ClickButton", 10 }, - { "CoinFly", 11 }, - { "DamageByArrow", 12 }, - { "DamageByBullet", 13 }, - { "DamageByCannonBall", 14 }, - { "Defeat", 15 }, - { "DestroyBox", 16 }, - { "DevilAttackShield", 17 }, - { "DevilBeHit_01", 18 }, - { "DevilBeHit_02", 18 }, - { "DevilBeHit_03", 18 }, - { "DevilDie", 19 }, - { "DevilFire", 20 }, - { "DevilResurrection", 21 }, - { "DragonAttackShield", 22 }, - { "DragonBeHit", 23 }, - { "DragonDie", 24 }, - { "DragonFire", 25 }, - { "DragonResurrection", 26 }, - { "GhostAttackShield", 27 }, - { "GhostBeHit", 28 }, - { "GhostDie", 29 }, - { "GhostFire", 30 }, - { "GhostResurrection", 31 }, - { "GunFire", 32 }, - { "HorseMove", 33 }, - { "LevelBegins", 34 }, - { "PrincessDown", 35 }, - { "PrincessFear", 36 }, - { "ShieldBroken", 37 }, - { "ShieldUnderAttack", 38 }, - { "Spin", 39 }, - { "TigerMove", 40 }, - { "UnlockProp", 41 }, - { "UnlockTurret", 42 }, - { "Victory", 43 }, - { "WeaponExhausted", 44 }, - { "WeaponFire", 45 }, - { "au_stream", 46 }, - { "rain", 46 }, - { "Chinese Number 01", 48 }, - { "Chinese Number 02", 48 }, - { "Chinese Number 03", 48 }, - { "Chinese Number 04", 48 }, - { "Chinese Number 05", 48 }, - { "Chinese Number 06", 49 }, - { "Chinese Number 07", 49 }, - { "Chinese Number 08", 49 }, - { "Chinese Number 09", 49 }, - { "Chinese Number 10", 49 }, - { "Japanese Number 02", 51 }, - { "Bar", 52 }, - { "Beat", 53 }, - { "Grid", 54 }, - { "NVDice", 55 }, - { "NVHeartbeats", 56 }, - { "au_sfx_notice_level_countDown_edge", 57 }, - { "au_sfx_notice_level_countDown_time", 58 }, - { "0,62", 59 }, - { "1,65", 59 }, - { "2,68", 59 }, - { "0,63", 60 }, - { "1,66", 60 }, - { "2,69", 60 }, - { "0,64", 61 }, - { "1,67", 61 }, - { "2,70", 61 }, - { "au_coreplay_choose_v120_a", 62 }, - { "au_coreplay_unchoose_v120_a", 63 }, - { "au_coreplay_clear_v120_a", 64 }, - { "au_sfx_ui_button_corePlay_choose_ice1", 65 }, - { "au_sfx_ui_button_corePlay_choose_ice2", 65 }, - { "au_sfx_ui_button_corePlay_choose_ice3", 65 }, - { "au_sfx_ui_button_corePlay_unchoose_ice1", 66 }, - { "au_sfx_ui_button_corePlay_unchoose_ice2", 66 }, - { "au_sfx_ui_button_corePlay_unchoose_ice3", 66 }, - { "au_sfx_ui_button_corePlay_clear_ice1", 67 }, - { "au_sfx_ui_button_corePlay_clear_ice2", 67 }, - { "au_sfx_ui_button_corePlay_clear_ice3", 67 }, - { "au_sfx_ui_button_corePlay_choose_cloud1", 68 }, - { "au_sfx_ui_button_corePlay_choose_cloud2", 68 }, - { "au_sfx_ui_button_corePlay_choose_cloud3", 68 }, - { "au_sfx_ui_button_corePlay_unchoose_cloud1", 69 }, - { "au_sfx_ui_button_corePlay_unchoose_cloud2", 69 }, - { "au_sfx_ui_button_corePlay_unchoose_cloud3", 69 }, - { "au_sfx_ui_button_corePlay_clear_cloud1", 70 }, - { "au_sfx_ui_button_corePlay_clear_cloud2", 70 }, - { "au_sfx_ui_button_corePlay_clear_cloud3", 70 }, - { "sfx_notice_test", 71 }, - { "Spanish Number 03", 73 }, - }; - - public static readonly HashSet AmbiguousNames = new() - { - "DevilBeHit_01", - "DevilBeHit_02", - "DevilBeHit_03", - "Chinese Number 01", - }; - - public static readonly HashSet SharedIdNames = new() - { - "DevilBeHit_01", - "DevilBeHit_02", - "DevilBeHit_03", - "au_stream", - "rain", - "Chinese Number 01", - "Chinese Number 02", - "Chinese Number 03", - "Chinese Number 04", - "Chinese Number 05", - "Chinese Number 06", - "Chinese Number 07", - "Chinese Number 08", - "Chinese Number 09", - "Chinese Number 10", - "0,62", - "1,65", - "2,68", - "0,63", - "1,66", - "2,69", - "0,64", - "1,67", - "2,70", - "au_sfx_ui_button_corePlay_choose_ice1", - "au_sfx_ui_button_corePlay_choose_ice2", - "au_sfx_ui_button_corePlay_choose_ice3", - "au_sfx_ui_button_corePlay_unchoose_ice1", - "au_sfx_ui_button_corePlay_unchoose_ice2", - "au_sfx_ui_button_corePlay_unchoose_ice3", - "au_sfx_ui_button_corePlay_clear_ice1", - "au_sfx_ui_button_corePlay_clear_ice2", - "au_sfx_ui_button_corePlay_clear_ice3", - "au_sfx_ui_button_corePlay_choose_cloud1", - "au_sfx_ui_button_corePlay_choose_cloud2", - "au_sfx_ui_button_corePlay_choose_cloud3", - "au_sfx_ui_button_corePlay_unchoose_cloud1", - "au_sfx_ui_button_corePlay_unchoose_cloud2", - "au_sfx_ui_button_corePlay_unchoose_cloud3", - "au_sfx_ui_button_corePlay_clear_cloud1", - "au_sfx_ui_button_corePlay_clear_cloud2", - "au_sfx_ui_button_corePlay_clear_cloud3", - }; -} -} diff --git a/Assets/Scripts/OCES/Audio/HandWritten/AudioSystem.cs b/Assets/Scripts/OCES/Audio/HandWritten/AudioSystem.cs index 207a55d..0439268 100644 --- a/Assets/Scripts/OCES/Audio/HandWritten/AudioSystem.cs +++ b/Assets/Scripts/OCES/Audio/HandWritten/AudioSystem.cs @@ -68,13 +68,13 @@ namespace OCES.Audio [Obsolete("Use Play(uint) instead")] public void Play(string audioName) { - if (!AudioObjectDefinitions.NameToId.TryGetValue(audioName, out uint id)) + if (!NameDictionaries.NameToId.TryGetValue(audioName, out uint id)) { Debug.LogWarning($"[Audio] Name '{audioName}' not found."); return; } - if (AudioObjectDefinitions.AmbiguousNames.Contains(audioName)) + if (NameDictionaries.AmbiguousNames.Contains(audioName)) { Debug.LogWarning( $"[AudioSystem] Name '{audioName}' is ambiguous. Using first matched ID: {id}. " + @@ -82,7 +82,7 @@ namespace OCES.Audio ); } - if (AudioObjectDefinitions.SharedIdNames.Contains(audioName)) + if (NameDictionaries.SharedIdNames.Contains(audioName)) { Debug.LogWarning( $"[AudioSystem] Name '{audioName}' is a item of a container AudioObject (ID: {id}). " + @@ -244,7 +244,7 @@ namespace OCES.Audio this.m_musicSystem.OnGrid += id => this.OnGrid?.Invoke(id); // ── 注册 StateGroup ── - EnumIds.RegisterAllGameState(); + Parameters.EnumIds.RegisterAllGameState(); ActiveStates = new Dictionary(); } @@ -255,7 +255,7 @@ namespace OCES.Audio // 触发一次初始状态,让音乐系统从默认状态开始匹配 if (this.startWithMusic) { - SetState(GameState.Home); + SetState(Parameters.GameState.Home); } } diff --git a/Assets/Scripts/OCES/SetStateBind.cs b/Assets/Scripts/OCES/SetStateBind.cs index 5d50705..ba2e7bc 100644 --- a/Assets/Scripts/OCES/SetStateBind.cs +++ b/Assets/Scripts/OCES/SetStateBind.cs @@ -7,7 +7,7 @@ namespace OCES { public class SetStateBind : MonoBehaviour { - public GameState targetGameState; + public Parameters.GameState targetGameState; public bool enableLowpass; public Text buttonText;