//------------------------------------------------------------------------------ // // 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 { public sealed partial class AquariumEgg : Bright.Config.BeanBase { public JSONNode json; public AquariumEgg(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["Name"]["key"].IsString) { throw new SerializationException(); } Name_l10n_key = _json["Name"]["key"]; if(!_json["Name"]["text"].IsString) { throw new SerializationException(); } Name = _json["Name"]["text"]; } { if(!_json["Quality"].IsNumber) { throw new SerializationException(); } Quality = _json["Quality"]; } { if(!_json["Weight"].IsNumber) { throw new SerializationException(); } Weight = _json["Weight"]; } { if(!_json["Prefab"].IsString) { throw new SerializationException(); } Prefab = _json["Prefab"]; } { if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; } { var __json0 = _json["HatchTime"]; if(!__json0.IsArray) { throw new SerializationException(); } HatchTime = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } HatchTime.Add(__v0); } } { if(!_json["BreakReward"].IsNumber) { throw new SerializationException(); } BreakReward = _json["BreakReward"]; } { var __json0 = _json["HatchFishQuality"]; if(!__json0.IsArray) { throw new SerializationException(); } HatchFishQuality = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } HatchFishQuality.Add(__v0); } } { var __json0 = _json["HatchFishQualityProb"]; if(!__json0.IsArray) { throw new SerializationException(); } HatchFishQualityProb = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } HatchFishQualityProb.Add(__v0); } } { var __json0 = _json["HatchFishQuantity"]; if(!__json0.IsArray) { throw new SerializationException(); } HatchFishQuantity = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } HatchFishQuantity.Add(__v0); } } { var __json0 = _json["HatchFishQuantityProb"]; if(!__json0.IsArray) { throw new SerializationException(); } HatchFishQuantityProb = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } HatchFishQuantityProb.Add(__v0); } } json = _json; PostInit(); } public AquariumEgg(int ID, string Name, int Quality, float Weight, string Prefab, string Icon, System.Collections.Generic.List HatchTime, int BreakReward, System.Collections.Generic.List HatchFishQuality, System.Collections.Generic.List HatchFishQualityProb, System.Collections.Generic.List HatchFishQuantity, System.Collections.Generic.List HatchFishQuantityProb ) { this.ID = ID; this.Name = Name; this.Quality = Quality; this.Weight = Weight; this.Prefab = Prefab; this.Icon = Icon; this.HatchTime = HatchTime; this.BreakReward = BreakReward; this.HatchFishQuality = HatchFishQuality; this.HatchFishQualityProb = HatchFishQualityProb; this.HatchFishQuantity = HatchFishQuantity; this.HatchFishQuantityProb = HatchFishQuantityProb; PostInit(); } public static AquariumEgg DeserializeAquariumEgg(JSONNode _json) { return new AquariumEgg(_json); } /// /// 编号 /// public int ID { get; private set; } /// /// 蛋的名称 /// public string Name { get; private set; } public string Name_l10n_key { get; } /// /// 品质 /// public int Quality { get; private set; } /// /// 摇蛋权重 /// public float Weight { get; private set; } /// /// 蛋的资源 /// public string Prefab { get; private set; } /// /// 蛋的图标 /// public string Icon { get; private set; } /// /// 孵化时间 /// public System.Collections.Generic.List HatchTime { get; private set; } /// /// 击碎奖励 /// public int BreakReward { get; private set; } public System.Collections.Generic.List HatchFishQuality { get; private set; } public System.Collections.Generic.List HatchFishQualityProb { get; private set; } public System.Collections.Generic.List HatchFishQuantity { get; private set; } public System.Collections.Generic.List HatchFishQuantityProb { get; private set; } public const int __ID__ = 174826522; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Name = translator(Name_l10n_key, Name); } public override string ToString() { return "{ " + "ID:" + ID + "," + "Name:" + Name + "," + "Quality:" + Quality + "," + "Weight:" + Weight + "," + "Prefab:" + Prefab + "," + "Icon:" + Icon + "," + "HatchTime:" + Bright.Common.StringUtil.CollectionToString(HatchTime) + "," + "BreakReward:" + BreakReward + "," + "HatchFishQuality:" + Bright.Common.StringUtil.CollectionToString(HatchFishQuality) + "," + "HatchFishQualityProb:" + Bright.Common.StringUtil.CollectionToString(HatchFishQualityProb) + "," + "HatchFishQuantity:" + Bright.Common.StringUtil.CollectionToString(HatchFishQuantity) + "," + "HatchFishQuantityProb:" + Bright.Common.StringUtil.CollectionToString(HatchFishQuantityProb) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }