Files
back_cantanBuilding/Assets/Scripts/Tables/WheelInit.cs
2026-05-26 16:15:54 +08:00

93 lines
3.5 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace cfg
{
public sealed partial class WheelInit : Bright.Config.BeanBase
{
public JSONNode json;
public WheelInit(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Title"]["key"].IsString) { throw new SerializationException(); } Title_l10n_key = _json["Title"]["key"]; if(!_json["Title"]["text"].IsString) { throw new SerializationException(); } Title = _json["Title"]["text"]; }
{ if(!_json["SpecialTitle"]["key"].IsString) { throw new SerializationException(); } SpecialTitle_l10n_key = _json["SpecialTitle"]["key"]; if(!_json["SpecialTitle"]["text"].IsString) { throw new SerializationException(); } SpecialTitle = _json["SpecialTitle"]["text"]; }
{ if(!_json["Bg"].IsString) { throw new SerializationException(); } Bg = _json["Bg"]; }
{ if(!_json["SpBg"].IsString) { throw new SerializationException(); } SpBg = _json["SpBg"]; }
{ var __json0 = _json["Discount"]; if(!__json0.IsArray) { throw new SerializationException(); } Discount = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Discount.Add(__v0); } }
json = _json;
PostInit();
}
public WheelInit(int ID, string Title, string SpecialTitle, string Bg, string SpBg, System.Collections.Generic.List<float> Discount )
{
this.ID = ID;
this.Title = Title;
this.SpecialTitle = SpecialTitle;
this.Bg = Bg;
this.SpBg = SpBg;
this.Discount = Discount;
PostInit();
}
public static WheelInit DeserializeWheelInit(JSONNode _json)
{
return new WheelInit(_json);
}
public int ID { get; private set; }
/// <summary>
/// key
/// </summary>
public string Title { get; private set; }
public string Title_l10n_key { get; }
/// <summary>
/// key
/// </summary>
public string SpecialTitle { get; private set; }
public string SpecialTitle_l10n_key { get; }
public string Bg { get; private set; }
public string SpBg { get; private set; }
public System.Collections.Generic.List<float> Discount { get; private set; }
public const int __ID__ = 671059691;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
Title = translator(Title_l10n_key, Title);
SpecialTitle = translator(SpecialTitle_l10n_key, SpecialTitle);
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Title:" + Title + ","
+ "SpecialTitle:" + SpecialTitle + ","
+ "Bg:" + Bg + ","
+ "SpBg:" + SpBg + ","
+ "Discount:" + Bright.Common.StringUtil.CollectionToString(Discount) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}