备份CatanBuilding瘦身独立工程
This commit is contained in:
89
Assets/Scripts/Tables/BattlePassTask.cs
Normal file
89
Assets/Scripts/Tables/BattlePassTask.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 BattlePassTask : Bright.Config.BeanBase
|
||||
{
|
||||
public JSONNode json;
|
||||
public BattlePassTask(JSONNode _json)
|
||||
{
|
||||
{ if(!_json["TaskID"].IsNumber) { throw new SerializationException(); } TaskID = _json["TaskID"]; }
|
||||
{ if(!_json["Desc"]["key"].IsString) { throw new SerializationException(); } Desc_l10n_key = _json["Desc"]["key"]; if(!_json["Desc"]["text"].IsString) { throw new SerializationException(); } Desc = _json["Desc"]["text"]; }
|
||||
{ if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = (ConditionType)_json["Type"].AsInt; }
|
||||
{ var __json0 = _json["Param"]; if(!__json0.IsArray) { throw new SerializationException(); } Param = new System.Collections.Generic.List<string>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } Param.Add(__v0); } }
|
||||
{ if(!_json["Reward"].IsNumber) { throw new SerializationException(); } Reward = _json["Reward"]; }
|
||||
json = _json;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public BattlePassTask(int TaskID, string Desc, ConditionType Type, System.Collections.Generic.List<string> Param, int Reward )
|
||||
{
|
||||
this.TaskID = TaskID;
|
||||
this.Desc = Desc;
|
||||
this.Type = Type;
|
||||
this.Param = Param;
|
||||
this.Reward = Reward;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public static BattlePassTask DeserializeBattlePassTask(JSONNode _json)
|
||||
{
|
||||
return new BattlePassTask(_json);
|
||||
}
|
||||
|
||||
public int TaskID { get; private set; }
|
||||
/// <summary>
|
||||
/// key
|
||||
/// </summary>
|
||||
public string Desc { get; private set; }
|
||||
public string Desc_l10n_key { get; }
|
||||
public ConditionType Type { get; private set; }
|
||||
/// <summary>
|
||||
/// 逗号隔开
|
||||
/// </summary>
|
||||
public System.Collections.Generic.List<string> Param { get; private set; }
|
||||
/// <summary>
|
||||
/// DropID,第一位是战令经验,第二位是道具
|
||||
/// </summary>
|
||||
public int Reward { get; private set; }
|
||||
|
||||
public const int __ID__ = 1765991982;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
{
|
||||
Desc = translator(Desc_l10n_key, Desc);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "TaskID:" + TaskID + ","
|
||||
+ "Desc:" + Desc + ","
|
||||
+ "Type:" + Type + ","
|
||||
+ "Param:" + Bright.Common.StringUtil.CollectionToString(Param) + ","
|
||||
+ "Reward:" + Reward + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user