//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace cfg.AudioCfg
{
public sealed partial class DataAudio : Bright.Config.BeanBase
{
public DataAudio(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Key"].IsString) { throw new SerializationException(); } Key = _json["Key"]; }
{ if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = (AudioCfg.AudioType)_json["Type"].AsInt; }
{ if(!_json["CueName"].IsString) { throw new SerializationException(); } CueName = _json["CueName"]; }
{ if(!_json["CueID"].IsNumber) { throw new SerializationException(); } CueID = _json["CueID"]; }
{ if(!_json["Path"].IsString) { throw new SerializationException(); } Path = _json["Path"]; }
PostInit();
}
public DataAudio(int ID, string Key, AudioCfg.AudioType Type, string CueName, int CueID, string Path )
{
this.ID = ID;
this.Key = Key;
this.Type = Type;
this.CueName = CueName;
this.CueID = CueID;
this.Path = Path;
PostInit();
}
public static DataAudio DeserializeDataAudio(JSONNode _json)
{
return new AudioCfg.DataAudio(_json);
}
///
/// 音频ID
///
public int ID { get; private set; }
///
/// 音频Key
///
public string Key { get; private set; }
///
/// 音频Key
///
public AudioCfg.AudioType Type { get; private set; }
///
/// 内部播放名
///
public string CueName { get; private set; }
///
/// 内部播放ID
///
public int CueID { get; private set; }
///
/// 音频路径
///
public string Path { get; private set; }
public const int __ID__ = 1480358156;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Key:" + Key + ","
+ "Type:" + Type + ","
+ "CueName:" + CueName + ","
+ "CueID:" + CueID + ","
+ "Path:" + Path + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}