IndieGame/client/Assets/Scripts/AutoGenerated/Table/ConditionTable.cs

75 lines
2.4 KiB
C#
Raw Normal View History

2024-10-11 10:12:15 +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 Luban;
using SimpleJSON;
namespace TableConfig
{
public sealed partial class ConditionTable : Luban.BeanBase
{
public ConditionTable(JSONNode _buf)
{
{ if(!_buf["Id"].IsNumber) { throw new SerializationException(); } Id = _buf["Id"]; }
{ if(!_buf["Name"].IsString) { throw new SerializationException(); } Name = _buf["Name"]; }
{ if(!_buf["Type"].IsNumber) { throw new SerializationException(); } Type = (ConditionType)_buf["Type"].AsInt; }
{ if(!_buf["TaskId"].IsNumber) { throw new SerializationException(); } TaskId = _buf["TaskId"]; }
{ var __json0 = _buf["PropItem"]; if(!__json0.IsArray) { throw new SerializationException(); } PropItem = new System.Collections.Generic.List<Item>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Item __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Item.DeserializeItem(__e0); } PropItem.Add(__v0); } }
}
public static ConditionTable DeserializeConditionTable(JSONNode _buf)
{
return new ConditionTable(_buf);
}
/// <summary>
/// 条件id
/// </summary>
public readonly int Id;
/// <summary>
/// 条件名称
/// </summary>
public readonly string Name;
/// <summary>
/// 条件类型
/// </summary>
public readonly ConditionType Type;
/// <summary>
/// 任务Id
/// </summary>
public readonly int TaskId;
/// <summary>
/// 道具
/// </summary>
public readonly System.Collections.Generic.List<Item> PropItem;
public const int __ID__ = -1403411565;
public override int GetTypeId() => __ID__;
public void ResolveRef(Tables tables)
{
foreach (var _e in PropItem) { _e?.ResolveRef(tables); }
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Name:" + Name + ","
+ "Type:" + Type + ","
+ "TaskId:" + TaskId + ","
+ "PropItem:" + Luban.StringUtil.CollectionToString(PropItem) + ","
+ "}";
}
}
}