//------------------------------------------------------------------------------ // // 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"].IsNumber) { 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) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Contain.Add(__v0); } } { if(!_buf["Chapternext"].IsNumber) { throw new SerializationException(); } Chapternext = _buf["Chapternext"]; } { var __json0 = _buf["Buttoncoordinates"]; if(!__json0.IsArray) { throw new SerializationException(); } Buttoncoordinates = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Vec2 __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Vec2.DeserializeVec2(__e0); } Buttoncoordinates.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 int Chaptername; /// /// 包含关卡ID /// public readonly System.Collections.Generic.List Contain; /// /// 第几章节 /// public readonly int Chapternext; /// /// 按钮坐标 /// public readonly System.Collections.Generic.List Buttoncoordinates; /// /// 关卡宝箱ID /// public readonly int Reward; public const int __ID__ = 1465034155; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { foreach (var _e in Buttoncoordinates) { _e?.ResolveRef(tables); } } public override string ToString() { return "{ " + "ID:" + ID + "," + "Chaptericon:" + Chaptericon + "," + "Chaptername:" + Chaptername + "," + "Contain:" + Luban.StringUtil.CollectionToString(Contain) + "," + "Chapternext:" + Chapternext + "," + "Buttoncoordinates:" + Luban.StringUtil.CollectionToString(Buttoncoordinates) + "," + "Reward:" + Reward + "," + "}"; } } }