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:
@@ -94,9 +94,9 @@ public partial class MusicContainer : IBinarySerializable
|
||||
else
|
||||
{
|
||||
writer.Write(Segments.Count);
|
||||
for (int i = 0; i < Segments.Count; i++)
|
||||
foreach (var t in Segments)
|
||||
{
|
||||
writer.Write(Segments[i]);
|
||||
writer.Write(t);
|
||||
}
|
||||
}
|
||||
writer.Write((byte)ContainerType);
|
||||
@@ -116,7 +116,7 @@ public partial class MusicContainerConfig : IBinarySerializable
|
||||
|
||||
public List<MusicContainer> MusicContainerList()
|
||||
{
|
||||
this.m_musicContainerInfoList ??= new List<MusicContainer>(m_musicContainerInfos.Values);
|
||||
this.m_musicContainerInfoList ??= new List<MusicContainer>(this.m_musicContainerInfos.Values);
|
||||
return this.m_musicContainerInfoList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user