//------------------------------------------------------------------------------ // // 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.test { /// /// 这是一个矩形 /// public sealed partial class Rectangle : Shape { public Rectangle(JSONNode _buf) : base(_buf) { { if(!_buf["width"].IsNumber) { throw new SerializationException(); } Width = _buf["width"]; } { if(!_buf["height"].IsNumber) { throw new SerializationException(); } Height = _buf["height"]; } } public static Rectangle DeserializeRectangle(JSONNode _buf) { return new test.Rectangle(_buf); } /// /// 宽度 /// public readonly float Width; /// /// 高度 /// public readonly float Height; public const int __ID__ = -31893773; public override int GetTypeId() => __ID__; public override void ResolveRef(Tables tables) { base.ResolveRef(tables); } public override string ToString() { return "{ " + "width:" + Width + "," + "height:" + Height + "," + "}"; } } }