//------------------------------------------------------------------------------ // // 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.BlacksmithData { public sealed partial class LevelData : Luban.BeanBase { public LevelData(JSONNode _buf) { { if(!_buf["ID"].IsNumber) { throw new SerializationException(); } ID = _buf["ID"]; } { if(!_buf["Levelicon"].IsString) { throw new SerializationException(); } Levelicon = _buf["Levelicon"]; } { if(!_buf["Level"].IsNumber) { throw new SerializationException(); } Level = _buf["Level"]; } { if(!_buf["Name"].IsString) { throw new SerializationException(); } Name = _buf["Name"]; } { if(!_buf["Levelopen"].IsNumber) { throw new SerializationException(); } Levelopen = _buf["Levelopen"]; } { var __json0 = _buf["Levelwaves"]; if(!__json0.IsArray) { throw new SerializationException(); } Levelwaves = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Levelwaves.Add(__v0); } } { var __json0 = _buf["Stagerewards"]; if(!__json0.IsArray) { throw new SerializationException(); } Stagerewards = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Stagerewards.Add(__v0); } } { if(!_buf["Gift"].IsNumber) { throw new SerializationException(); } Gift = _buf["Gift"]; } { if(!_buf["Physicalexertion"].IsNumber) { throw new SerializationException(); } Physicalexertion = _buf["Physicalexertion"]; } { if(!_buf["Music"].IsString) { throw new SerializationException(); } Music = _buf["Music"]; } } public static LevelData DeserializeLevelData(JSONNode _buf) { return new BlacksmithData.LevelData(_buf); } /// /// ID /// public readonly int ID; /// /// 关卡图标 /// public readonly string Levelicon; /// /// 关卡 /// public readonly int Level; /// /// 关卡名称 /// public readonly string Name; /// /// 关卡开启条件 /// public readonly int Levelopen; /// /// 关卡波次 /// public readonly System.Collections.Generic.List Levelwaves; /// /// 关卡阶段奖励 /// public readonly System.Collections.Generic.List Stagerewards; /// /// 奖励礼包ID /// public readonly int Gift; /// /// 体力消耗 /// public readonly int Physicalexertion; /// /// 背景音乐 /// public readonly string Music; public const int __ID__ = 267677838; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "ID:" + ID + "," + "Levelicon:" + Levelicon + "," + "Level:" + Level + "," + "Name:" + Name + "," + "Levelopen:" + Levelopen + "," + "Levelwaves:" + Luban.StringUtil.CollectionToString(Levelwaves) + "," + "Stagerewards:" + Luban.StringUtil.CollectionToString(Stagerewards) + "," + "Gift:" + Gift + "," + "Physicalexertion:" + Physicalexertion + "," + "Music:" + Music + "," + "}"; } } }