备份CatanBuilding瘦身独立工程
This commit is contained in:
118
Assets/Scripts/Tables/Construction.cs
Normal file
118
Assets/Scripts/Tables/Construction.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Construction : Bright.Config.BeanBase
|
||||
{
|
||||
public JSONNode json;
|
||||
public Construction(JSONNode _json)
|
||||
{
|
||||
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
|
||||
{ if(!_json["IsABTest"].IsBoolean) { throw new SerializationException(); } IsABTest = _json["IsABTest"]; }
|
||||
{ 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["InitialLevel"].IsNumber) { throw new SerializationException(); } InitialLevel = _json["InitialLevel"]; }
|
||||
{ if(!_json["NextID"].IsNumber) { throw new SerializationException(); } NextID = _json["NextID"]; }
|
||||
{ if(!_json["Prefab"].IsString) { throw new SerializationException(); } Prefab = _json["Prefab"]; }
|
||||
{ if(!_json["BombPrefab"].IsString) { throw new SerializationException(); } BombPrefab = _json["BombPrefab"]; }
|
||||
{ if(!_json["BGM"].IsString) { throw new SerializationException(); } BGM = _json["BGM"]; }
|
||||
{ var __json0 = _json["AreaList"]; if(!__json0.IsArray) { throw new SerializationException(); } AreaList = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } AreaList.Add(__v0); } }
|
||||
{ var __json0 = _json["MmtAreaList"]; if(!__json0.IsArray) { throw new SerializationException(); } MmtAreaList = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MmtAreaList.Add(__v0); } }
|
||||
json = _json;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public Construction(int ID, bool IsABTest, string Name, int InitialLevel, int NextID, string Prefab, string BombPrefab, string BGM, System.Collections.Generic.List<int> AreaList, System.Collections.Generic.List<int> MmtAreaList )
|
||||
{
|
||||
this.ID = ID;
|
||||
this.IsABTest = IsABTest;
|
||||
this.Name = Name;
|
||||
this.InitialLevel = InitialLevel;
|
||||
this.NextID = NextID;
|
||||
this.Prefab = Prefab;
|
||||
this.BombPrefab = BombPrefab;
|
||||
this.BGM = BGM;
|
||||
this.AreaList = AreaList;
|
||||
this.MmtAreaList = MmtAreaList;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public static Construction DeserializeConstruction(JSONNode _json)
|
||||
{
|
||||
return new Construction(_json);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主键,唯一标识
|
||||
/// </summary>
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
/// 0:否<br/>1:是<br/>是AB Test的场景不会展示
|
||||
/// </summary>
|
||||
public bool IsABTest { get; private set; }
|
||||
/// <summary>
|
||||
/// 多语言key + 中文
|
||||
/// </summary>
|
||||
public string Name { get; private set; }
|
||||
public string Name_l10n_key { get; }
|
||||
public int InitialLevel { get; private set; }
|
||||
/// <summary>
|
||||
/// 对应本表主键<br/>-1则为结束
|
||||
/// </summary>
|
||||
public int NextID { get; private set; }
|
||||
/// <summary>
|
||||
/// 此列已作废
|
||||
/// </summary>
|
||||
public string Prefab { get; private set; }
|
||||
public string BombPrefab { get; private set; }
|
||||
/// <summary>
|
||||
/// 音频资源
|
||||
/// </summary>
|
||||
public string BGM { get; private set; }
|
||||
public System.Collections.Generic.List<int> AreaList { get; private set; }
|
||||
public System.Collections.Generic.List<int> MmtAreaList { get; private set; }
|
||||
|
||||
public const int __ID__ = -1831639823;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
{
|
||||
Name = translator(Name_l10n_key, Name);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "ID:" + ID + ","
|
||||
+ "IsABTest:" + IsABTest + ","
|
||||
+ "Name:" + Name + ","
|
||||
+ "InitialLevel:" + InitialLevel + ","
|
||||
+ "NextID:" + NextID + ","
|
||||
+ "Prefab:" + Prefab + ","
|
||||
+ "BombPrefab:" + BombPrefab + ","
|
||||
+ "BGM:" + BGM + ","
|
||||
+ "AreaList:" + Bright.Common.StringUtil.CollectionToString(AreaList) + ","
|
||||
+ "MmtAreaList:" + Bright.Common.StringUtil.CollectionToString(MmtAreaList) + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user