feat: implement audio object definitions and refactor audio system
- Add AudioObjectDefinitions.cs with name-to-ID mappings and ambiguity detection - Update AudioSystem.cs to support Play(uint) and deprecated Play(string) with warnings - Rename PitchStepManager to PitchStepResolver and update all references - Refactor generated code to use 'this.' prefix and foreach loops - Remove TestEnum from audio enums and IDs - Update SampleScene.unity to use new AudioSystem namespace and rain sound parameter - Optimize binary serialization in generated audio classes
This commit is contained in:
@@ -178,9 +178,9 @@ public partial class AudioObject : IBinarySerializable
|
||||
else
|
||||
{
|
||||
writer.Write(Name.Count);
|
||||
for (int i = 0; i < Name.Count; i++)
|
||||
foreach (var t in Name)
|
||||
{
|
||||
writer.Write(Name[i]);
|
||||
writer.Write(t);
|
||||
}
|
||||
}
|
||||
writer.Write(Comment);
|
||||
@@ -213,7 +213,7 @@ public partial class AudioObjectConfig : IBinarySerializable
|
||||
|
||||
public List<AudioObject> AudioObjectList()
|
||||
{
|
||||
this.m_audioObjectInfoList ??= new List<AudioObject>(m_audioObjectInfos.Values);
|
||||
this.m_audioObjectInfoList ??= new List<AudioObject>(this.m_audioObjectInfos.Values);
|
||||
return this.m_audioObjectInfoList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user