NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/GenCode/Luban/DataTable/DataSystemCfg.cs

71 lines
2.0 KiB
C#
Raw Normal View History

2023-12-21 20:00:58 +08:00
//------------------------------------------------------------------------------
// <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 DataSystemCfg : Bright.Config.BeanBase
{
public DataSystemCfg(JSONNode _json)
{
{ if(!_json["Id"].IsNumber) { throw new SerializationException(); } Id = (ESystemType)_json["Id"].AsInt; }
{ var __json0 = _json["Unlock"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; Unlock = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Unlock[__index0++] = __v0; } }
PostInit();
}
public DataSystemCfg(ESystemType Id, int[] Unlock )
{
this.Id = Id;
this.Unlock = Unlock;
PostInit();
}
public static DataSystemCfg DeserializeDataSystemCfg(JSONNode _json)
{
return new DataSystemCfg(_json);
}
/// <summary>
/// 系统类型
/// </summary>
public ESystemType Id { get; private set; }
/// <summary>
/// 解锁条件
/// </summary>
public int[] Unlock { get; private set; }
public const int __ID__ = 122753803;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Unlock:" + Bright.Common.StringUtil.CollectionToString(Unlock) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}