91 lines
2.0 KiB
C#
91 lines
2.0 KiB
C#
/*
|
|
* auto generated by tools(注意:千万不要手动修改本文件)
|
|
* AmbiencePath
|
|
*/
|
|
using System;
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace OCES.Audio
|
|
{
|
|
[Serializable]
|
|
public partial class AmbiencePath : IBinarySerializable
|
|
{
|
|
/// <summary>
|
|
/// 从1开始的int
|
|
/// </summary>
|
|
public uint Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 在此定义path。格式为: TypeID1,子状态|TypeID2,子状态…… 无需判断的TypeID无需填写。
|
|
/// </summary>
|
|
public string Path { get; set; }
|
|
|
|
/// <summary>
|
|
/// 此处填写该Path要播放的ContainerID
|
|
/// </summary>
|
|
public uint ContainerId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 该条规则的优先级
|
|
/// </summary>
|
|
public int Priority { get; set; }
|
|
|
|
|
|
public void DeSerialize(BinaryReader reader)
|
|
{
|
|
Id = reader.ReadUInt32();
|
|
Path = reader.ReadString();
|
|
ContainerId = reader.ReadUInt32();
|
|
Priority = reader.ReadInt32();
|
|
}
|
|
|
|
public void Serialize(BinaryWriter writer)
|
|
{
|
|
writer.Write(Id);
|
|
writer.Write(Path);
|
|
writer.Write(ContainerId);
|
|
writer.Write(Priority);
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public partial class AmbiencePathConfig : IBinarySerializable
|
|
{
|
|
Dictionary<uint,AmbiencePath> m_ambiencePathInfos = new();
|
|
List<AmbiencePath> m_ambiencePathInfoList;
|
|
|
|
public List<AmbiencePath> AmbiencePathList()
|
|
{
|
|
this.m_ambiencePathInfoList ??= new List<AmbiencePath>(m_ambiencePathInfos.Values);
|
|
return this.m_ambiencePathInfoList;
|
|
}
|
|
|
|
public void DeSerialize(BinaryReader reader)
|
|
{
|
|
int count = reader.ReadInt32();
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
AmbiencePath tempData = new();
|
|
tempData.DeSerialize(reader);
|
|
this.m_ambiencePathInfos.Add(tempData.Id, tempData);
|
|
}
|
|
}
|
|
|
|
public void Serialize(BinaryWriter writer)
|
|
{
|
|
writer.Write(this.m_ambiencePathInfos.Count);
|
|
foreach (AmbiencePath ambiencePath in this.m_ambiencePathInfos.Values)
|
|
{
|
|
ambiencePath.Serialize(writer);
|
|
}
|
|
}
|
|
|
|
public AmbiencePath QueryById(uint id)
|
|
{
|
|
return this.m_ambiencePathInfos.GetValueOrDefault(id);
|
|
}
|
|
}
|
|
}
|