//------------------------------------------------------------------------------ // // 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 Reel : Luban.BeanBase { public Reel(JSONNode _buf) { { if(!_buf["id"].IsNumber) { throw new SerializationException(); } Id = _buf["id"]; } { if(!_buf["reel_type"].IsNumber) { throw new SerializationException(); } ReelType = _buf["reel_type"]; } { var __json0 = _buf["gear_ratio"]; if(!__json0.IsArray) { throw new SerializationException(); } GearRatio = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } GearRatio.Add(__v0); } } { if(!_buf["strength"].IsNumber) { throw new SerializationException(); } Strength = _buf["strength"]; } } public static Reel DeserializeReel(JSONNode _buf) { return new Reel(_buf); } /// /// Id /// public readonly int Id; /// /// 鱼轮类型 /// public readonly int ReelType; /// /// 组件比 /// public readonly System.Collections.Generic.List GearRatio; /// /// 强度 /// public readonly int Strength; public const int __ID__ = 2543162; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "id:" + Id + "," + "reelType:" + ReelType + "," + "gearRatio:" + Luban.StringUtil.CollectionToString(GearRatio) + "," + "strength:" + Strength + "," + "}"; } } }