//------------------------------------------------------------------------------ // // 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 Bright.Serialization; using System.Collections.Generic; using SimpleJSON; namespace cfg.TireMarkCfg { public sealed partial class DataTireMark : Bright.Config.BeanBase { public DataTireMark(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["TexturePath"].IsString) { throw new SerializationException(); } TexturePath = _json["TexturePath"]; } { if(!_json["WheelWidth"].IsNumber) { throw new SerializationException(); } WheelWidth = _json["WheelWidth"]; } { if(!_json["StartFadeDistance"].IsNumber) { throw new SerializationException(); } StartFadeDistance = _json["StartFadeDistance"]; } { if(!_json["SampleYScale"].IsNumber) { throw new SerializationException(); } SampleYScale = _json["SampleYScale"]; } { if(!_json["SampleXWidth"].IsNumber) { throw new SerializationException(); } SampleXWidth = _json["SampleXWidth"]; } { if(!_json["Color"].IsString) { throw new SerializationException(); } Color = _json["Color"]; } PostInit(); } public DataTireMark(int ID, string TexturePath, float WheelWidth, float StartFadeDistance, float SampleYScale, float SampleXWidth, string Color ) { this.ID = ID; this.TexturePath = TexturePath; this.WheelWidth = WheelWidth; this.StartFadeDistance = StartFadeDistance; this.SampleYScale = SampleYScale; this.SampleXWidth = SampleXWidth; this.Color = Color; PostInit(); } public static DataTireMark DeserializeDataTireMark(JSONNode _json) { return new TireMarkCfg.DataTireMark(_json); } /// /// 轮胎印id /// public int ID { get; private set; } /// /// 贴图路径 /// public string TexturePath { get; private set; } /// /// 轮胎印宽度 /// public float WheelWidth { get; private set; } /// /// 初始渐变长度 /// public float StartFadeDistance { get; private set; } /// /// 贴图采样Y轴缩放 /// public float SampleYScale { get; private set; } /// /// 贴图采样X宽度 /// public float SampleXWidth { get; private set; } /// /// 轮胎印颜色 /// public string Color { get; private set; } public const int __ID__ = 1341038110; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { } public override string ToString() { return "{ " + "ID:" + ID + "," + "TexturePath:" + TexturePath + "," + "WheelWidth:" + WheelWidth + "," + "StartFadeDistance:" + StartFadeDistance + "," + "SampleYScale:" + SampleYScale + "," + "SampleXWidth:" + SampleXWidth + "," + "Color:" + Color + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }