备份CatanBuilding瘦身独立工程
This commit is contained in:
92
Assets/Scripts/Tables/Picture.cs
Normal file
92
Assets/Scripts/Tables/Picture.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Picture : Bright.Config.BeanBase
|
||||
{
|
||||
public JSONNode json;
|
||||
public Picture(JSONNode _json)
|
||||
{
|
||||
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
|
||||
{ if(!_json["Image"].IsString) { throw new SerializationException(); } Image = _json["Image"]; }
|
||||
{ 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["Quality"].IsNumber) { throw new SerializationException(); } Quality = _json["Quality"]; }
|
||||
{ if(!_json["IsTradable"].IsBoolean) { throw new SerializationException(); } IsTradable = _json["IsTradable"]; }
|
||||
json = _json;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public Picture(int ID, string Image, string Title, int Quality, bool IsTradable )
|
||||
{
|
||||
this.ID = ID;
|
||||
this.Image = Image;
|
||||
this.Title = Title;
|
||||
this.Quality = Quality;
|
||||
this.IsTradable = IsTradable;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public static Picture DeserializePicture(JSONNode _json)
|
||||
{
|
||||
return new Picture(_json);
|
||||
}
|
||||
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
/// 图片名称
|
||||
/// </summary>
|
||||
public string Image { get; private set; }
|
||||
/// <summary>
|
||||
/// 多语言key + 中文
|
||||
/// </summary>
|
||||
public string Title { get; private set; }
|
||||
public string Title_l10n_key { get; }
|
||||
/// <summary>
|
||||
/// 对应星级
|
||||
/// </summary>
|
||||
public int Quality { get; private set; }
|
||||
/// <summary>
|
||||
/// 0:不可交易<br/>1:可交易
|
||||
/// </summary>
|
||||
public bool IsTradable { get; private set; }
|
||||
|
||||
public const int __ID__ = 1086911710;
|
||||
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);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "ID:" + ID + ","
|
||||
+ "Image:" + Image + ","
|
||||
+ "Title:" + Title + ","
|
||||
+ "Quality:" + Quality + ","
|
||||
+ "IsTradable:" + IsTradable + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user