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

86 lines
3.1 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 TaskTable : Luban.BeanBase
{
public TaskTable(JSONNode _buf)
{
{ if(!_buf["Id"].IsNumber) { throw new SerializationException(); } Id = _buf["Id"]; }
{ if(!_buf["Type"].IsNumber) { throw new SerializationException(); } Type = (TaskType)_buf["Type"].AsInt; }
{ if(!_buf["Name"].IsString) { throw new SerializationException(); } Name = _buf["Name"]; }
{ if(!_buf["Description"].IsString) { throw new SerializationException(); } Description = _buf["Description"]; }
{ if(!_buf["PreTask"].IsNumber) { throw new SerializationException(); } PreTask = _buf["PreTask"]; }
{ var __json0 = _buf["ReceiveCondition"]; if(!__json0.IsArray) { throw new SerializationException(); } ReceiveCondition = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ReceiveCondition.Add(__v0); } }
{ var __json0 = _buf["SuccessCondition"]; if(!__json0.IsArray) { throw new SerializationException(); } SuccessCondition = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } SuccessCondition.Add(__v0); } }
}
public static TaskTable DeserializeTaskTable(JSONNode _buf)
{
return new TaskTable(_buf);
}
/// <summary>
/// 任务id
/// </summary>
public readonly int Id;
/// <summary>
/// 任务类型
/// </summary>
public readonly TaskType Type;
/// <summary>
/// 任务名称
/// </summary>
public readonly string Name;
/// <summary>
/// 任务描述
/// </summary>
public readonly string Description;
/// <summary>
/// 前置任务
/// </summary>
public readonly int PreTask;
/// <summary>
/// 接取条件
/// </summary>
public readonly System.Collections.Generic.List<int> ReceiveCondition;
/// <summary>
/// 完成条件
/// </summary>
public readonly System.Collections.Generic.List<int> SuccessCondition;
public const int __ID__ = -2120818391;
public override int GetTypeId() => __ID__;
public void ResolveRef(Tables tables)
{
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Type:" + Type + ","
+ "Name:" + Name + ","
+ "Description:" + Description + ","
+ "PreTask:" + PreTask + ","
+ "ReceiveCondition:" + Luban.StringUtil.CollectionToString(ReceiveCondition) + ","
+ "SuccessCondition:" + Luban.StringUtil.CollectionToString(SuccessCondition) + ","
+ "}";
}
}
}