//------------------------------------------------------------------------------ // // 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 BChapter : Luban.BeanBase { public BChapter(JSONNode _buf) { { if(!_buf["ID"].IsNumber) { throw new SerializationException(); } ID = _buf["ID"]; } { if(!_buf["Chaptericon"].IsString) { throw new SerializationException(); } Chaptericon = _buf["Chaptericon"]; } { if(!_buf["Chaptername"].IsString) { throw new SerializationException(); } Chaptername = _buf["Chaptername"]; } { var __json0 = _buf["Contain"]; if(!__json0.IsArray) { throw new SerializationException(); } Contain = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } Contain.Add(__v0); } } { if(!_buf["Reward"].IsNumber) { throw new SerializationException(); } Reward = _buf["Reward"]; } } public static BChapter DeserializeBChapter(JSONNode _buf) { return new BChapter(_buf); } /// /// #ID /// public readonly int ID; /// /// 章节图标 /// public readonly string Chaptericon; /// /// 章节名称 /// public readonly string Chaptername; /// /// 包含关卡ID /// public readonly System.Collections.Generic.List Contain; /// /// 关卡宝箱ID /// public readonly int Reward; public const int __ID__ = 1465034155; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "ID:" + ID + "," + "Chaptericon:" + Chaptericon + "," + "Chaptername:" + Chaptername + "," + "Contain:" + Luban.StringUtil.CollectionToString(Contain) + "," + "Reward:" + Reward + "," + "}"; } } }