//------------------------------------------------------------------------------
//
// 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 Puzzle_Darkness : PuzzleJourneyMechanism
{
public Puzzle_Darkness(JSONNode _json) : base(_json)
{
{ if(!_json["LightType"].IsNumber) { throw new SerializationException(); } LightType = (EventPuzzleJourneyLightArea)_json["LightType"].AsInt; }
{ var __json0 = _json["ParamList"]; if(!__json0.IsArray) { throw new SerializationException(); } ParamList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ParamList.Add(__v0); } }
{ var __json0 = _json["PerfectCountRange"]; if(!__json0.IsArray) { throw new SerializationException(); } PerfectCountRange = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } PerfectCountRange.Add(__v0); } }
{ var __json0 = _json["PerfectCountTime"]; if(!__json0.IsArray) { throw new SerializationException(); } PerfectCountTime = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } PerfectCountTime.Add(__v0); } }
PostInit();
}
public Puzzle_Darkness(EventPuzzleJourneyLightArea LightType, System.Collections.Generic.List ParamList, System.Collections.Generic.List PerfectCountRange, System.Collections.Generic.List PerfectCountTime ) : base()
{
this.LightType = LightType;
this.ParamList = ParamList;
this.PerfectCountRange = PerfectCountRange;
this.PerfectCountTime = PerfectCountTime;
PostInit();
}
public static Puzzle_Darkness DeserializePuzzle_Darkness(JSONNode _json)
{
return new Puzzle_Darkness(_json);
}
///
/// 光亮方式
///
public EventPuzzleJourneyLightArea LightType { get; private set; }
///
/// 参数列表
///
public System.Collections.Generic.List ParamList { get; private set; }
///
/// 完美触发后的光亮范围,圆的半径等于几个格子
///
public System.Collections.Generic.List PerfectCountRange { get; private set; }
///
/// 完美触发后的光亮时间,单位秒
///
public System.Collections.Generic.List PerfectCountTime { get; private set; }
public const int __ID__ = 1183756718;
public override int GetTypeId() => __ID__;
public override void Resolve(Dictionary _tables)
{
base.Resolve(_tables);
PostResolve();
}
public override void TranslateText(System.Func translator)
{
base.TranslateText(translator);
}
public override string ToString()
{
return "{ "
+ "LightType:" + LightType + ","
+ "ParamList:" + Bright.Common.StringUtil.CollectionToString(ParamList) + ","
+ "PerfectCountRange:" + Bright.Common.StringUtil.CollectionToString(PerfectCountRange) + ","
+ "PerfectCountTime:" + Bright.Common.StringUtil.CollectionToString(PerfectCountTime) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}