//------------------------------------------------------------------------------
//
// 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
{
public sealed partial class EventPuzzleJourneyRound : Bright.Config.BeanBase
{
public JSONNode json;
public EventPuzzleJourneyRound(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["GridRows"].IsNumber) { throw new SerializationException(); } GridRows = _json["GridRows"]; }
{ if(!_json["GridCols"].IsNumber) { throw new SerializationException(); } GridCols = _json["GridCols"]; }
{ if(!_json["TotalCells"].IsNumber) { throw new SerializationException(); } TotalCells = _json["TotalCells"]; }
{ var __json0 = _json["PlacementCostList"]; if(!__json0.IsArray) { throw new SerializationException(); } PlacementCostList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } PlacementCostList.Add(__v0); } }
{ if(!_json["PictureName"].IsString) { throw new SerializationException(); } PictureName = _json["PictureName"]; }
{ if(!_json["AvailablePieceCount"].IsNumber) { throw new SerializationException(); } AvailablePieceCount = _json["AvailablePieceCount"]; }
{ if(!_json["Reward"].IsNumber) { throw new SerializationException(); } Reward = _json["Reward"]; }
json = _json;
PostInit();
}
public EventPuzzleJourneyRound(int ID, int GridRows, int GridCols, int TotalCells, System.Collections.Generic.List PlacementCostList, string PictureName, int AvailablePieceCount, int Reward )
{
this.ID = ID;
this.GridRows = GridRows;
this.GridCols = GridCols;
this.TotalCells = TotalCells;
this.PlacementCostList = PlacementCostList;
this.PictureName = PictureName;
this.AvailablePieceCount = AvailablePieceCount;
this.Reward = Reward;
PostInit();
}
public static EventPuzzleJourneyRound DeserializeEventPuzzleJourneyRound(JSONNode _json)
{
return new EventPuzzleJourneyRound(_json);
}
public int ID { get; private set; }
public int GridRows { get; private set; }
public int GridCols { get; private set; }
public int TotalCells { get; private set; }
///
/// 第n级第k块消耗 =
(n +2)×轮次 + (k-1) × n
///
public System.Collections.Generic.List PlacementCostList { get; private set; }
public string PictureName { get; private set; }
public int AvailablePieceCount { get; private set; }
///
/// 对应Drop表主键
///
public int Reward { get; private set; }
public const int __ID__ = 2080372006;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "GridRows:" + GridRows + ","
+ "GridCols:" + GridCols + ","
+ "TotalCells:" + TotalCells + ","
+ "PlacementCostList:" + Bright.Common.StringUtil.CollectionToString(PlacementCostList) + ","
+ "PictureName:" + PictureName + ","
+ "AvailablePieceCount:" + AvailablePieceCount + ","
+ "Reward:" + Reward + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}