//------------------------------------------------------------------------------ // // 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 BLevel : Luban.BeanBase { public BLevel(JSONNode _buf) { { if(!_buf["ID"].IsNumber) { throw new SerializationException(); } ID = _buf["ID"]; } { if(!_buf["name"].IsString) { throw new SerializationException(); } Name = _buf["name"]; } { if(!_buf["Front"].IsNumber) { throw new SerializationException(); } Front = _buf["Front"]; } { if(!_buf["Strength"].IsNumber) { throw new SerializationException(); } Strength = _buf["Strength"]; } { if(!_buf["Timetype"].IsNumber) { throw new SerializationException(); } Timetype = _buf["Timetype"]; } { if(!_buf["Countdown"].IsNumber) { throw new SerializationException(); } Countdown = _buf["Countdown"]; } { if(!_buf["Box"].IsNumber) { throw new SerializationException(); } Box = _buf["Box"]; } { if(!_buf["Maintasks"].IsNumber) { throw new SerializationException(); } Maintasks = _buf["Maintasks"]; } { var __json0 = _buf["Additionaltasks"]; if(!__json0.IsArray) { throw new SerializationException(); } Additionaltasks = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } Additionaltasks.Add(__v0); } } { if(!_buf["Length"].IsNumber) { throw new SerializationException(); } Length = _buf["Length"]; } { if(!_buf["Target"].IsNumber) { throw new SerializationException(); } Target = _buf["Target"]; } { var __json0 = _buf["Nodelocation"]; if(!__json0.IsArray) { throw new SerializationException(); } Nodelocation = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Nodelocation.Add(__v0); } } { var __json0 = _buf["Eventgroupid"]; if(!__json0.IsArray) { throw new SerializationException(); } Eventgroupid = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Eventgroupid.Add(__v0); } } { if(!_buf["Rewards"].IsNumber) { throw new SerializationException(); } Rewards = _buf["Rewards"]; } } public static BLevel DeserializeBLevel(JSONNode _buf) { return new BLevel(_buf); } /// /// 关卡ID /// public readonly int ID; /// /// #ID /// public readonly string Name; /// /// 关卡开启前置 /// public readonly int Front; /// /// 体力消耗 /// public readonly int Strength; /// /// 时间类型 /// public readonly int Timetype; /// /// 装箱倒计时 /// public readonly int Countdown; /// /// 默认箱子 /// public readonly int Box; /// /// 关卡主要任务 /// public readonly int Maintasks; /// /// 关卡额外任务 /// public readonly System.Collections.Generic.List Additionaltasks; /// /// 关卡走路长度 /// public readonly int Length; /// /// 目标万分比 /// public readonly int Target; /// /// 关卡节点位置 /// public readonly System.Collections.Generic.List Nodelocation; /// /// 节点事件组ID /// public readonly System.Collections.Generic.List Eventgroupid; /// /// 关卡奖励 /// public readonly int Rewards; public const int __ID__ = 1962837090; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "ID:" + ID + "," + "name:" + Name + "," + "Front:" + Front + "," + "Strength:" + Strength + "," + "Timetype:" + Timetype + "," + "Countdown:" + Countdown + "," + "Box:" + Box + "," + "Maintasks:" + Maintasks + "," + "Additionaltasks:" + Luban.StringUtil.CollectionToString(Additionaltasks) + "," + "Length:" + Length + "," + "Target:" + Target + "," + "Nodelocation:" + Luban.StringUtil.CollectionToString(Nodelocation) + "," + "Eventgroupid:" + Luban.StringUtil.CollectionToString(Eventgroupid) + "," + "Rewards:" + Rewards + "," + "}"; } } }