//------------------------------------------------------------------------------
//
// 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.LevelCfg
{
public sealed partial class DataLevelGroup : Bright.Config.BeanBase
{
public DataLevelGroup(JSONNode _json)
{
{ if(!_json["Id"].IsNumber) { throw new SerializationException(); } Id = _json["Id"]; }
{ if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = (LevelCfg.LevelGroupType)_json["Type"].AsInt; }
{ if(!_json["MaterialIcon"].IsString) { throw new SerializationException(); } MaterialIcon = _json["MaterialIcon"]; }
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["Desc"].IsString) { throw new SerializationException(); } Desc = _json["Desc"]; }
PostInit();
}
public DataLevelGroup(int Id, LevelCfg.LevelGroupType Type, string MaterialIcon, string Name, string Desc )
{
this.Id = Id;
this.Type = Type;
this.MaterialIcon = MaterialIcon;
this.Name = Name;
this.Desc = Desc;
PostInit();
}
public static DataLevelGroup DeserializeDataLevelGroup(JSONNode _json)
{
return new LevelCfg.DataLevelGroup(_json);
}
///
/// 关卡组ID
///
public int Id { get; private set; }
///
/// 关卡类型
///
public LevelCfg.LevelGroupType Type { get; private set; }
///
/// 素材图标
///
public string MaterialIcon { get; private set; }
///
/// 关卡组名字
///
public string Name { get; private set; }
///
/// 关卡组描述
///
public string Desc { get; private set; }
public const int __ID__ = 1396613651;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Type:" + Type + ","
+ "MaterialIcon:" + MaterialIcon + ","
+ "Name:" + Name + ","
+ "Desc:" + Desc + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}