//------------------------------------------------------------------------------ // // 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 Luban; using SimpleJSON; namespace cfg { public sealed partial class DataSystemCfg : Luban.BeanBase { public JSONNode cacheJsonNode {get; private set;} public DataSystemCfg(JSONNode _buf) { cacheJsonNode = _buf; { if(!_buf["Id"].IsNumber) { throw new SerializationException(); } Id = (ESystemType)_buf["Id"].AsInt; } { var __json0 = _buf["Unlock"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; Unlock = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Unlock[__index0++] = __v0; } } } public DataSystemCfg(ESystemType Id, int[] Unlock ) { this.Id = Id; this.Unlock = Unlock; } public static DataSystemCfg DeserializeDataSystemCfg(JSONNode _buf) { return new DataSystemCfg(_buf); } /// /// 系统类型 /// public ESystemType Id { get; private set; } /// /// 解锁条件 /// public int[] Unlock { get; private set; } public const int __ID__ = 122753803; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "Id:" + Id + "," + "Unlock:" + Luban.StringUtil.CollectionToString(Unlock) + "," + "}"; } } }