//------------------------------------------------------------------------------
//
// 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 RodShakeParam : Bright.Config.BeanBase
{
public JSONNode json;
public RodShakeParam(JSONNode _json)
{
{ if(!_json["Animation"].IsString) { throw new SerializationException(); } Animation = _json["Animation"]; }
{ var __json0 = _json["PosAmp"]; if(!__json0.IsArray) { throw new SerializationException(); } PosAmp = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } PosAmp.Add(__v0); } }
{ var __json0 = _json["PosPeriod"]; if(!__json0.IsArray) { throw new SerializationException(); } PosPeriod = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } PosPeriod.Add(__v0); } }
{ var __json0 = _json["ScaleAmp"]; if(!__json0.IsArray) { throw new SerializationException(); } ScaleAmp = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ScaleAmp.Add(__v0); } }
{ var __json0 = _json["ScalePeriod"]; if(!__json0.IsArray) { throw new SerializationException(); } ScalePeriod = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ScalePeriod.Add(__v0); } }
json = _json;
PostInit();
}
public RodShakeParam(string Animation, System.Collections.Generic.List PosAmp, System.Collections.Generic.List PosPeriod, System.Collections.Generic.List ScaleAmp, System.Collections.Generic.List ScalePeriod )
{
this.Animation = Animation;
this.PosAmp = PosAmp;
this.PosPeriod = PosPeriod;
this.ScaleAmp = ScaleAmp;
this.ScalePeriod = ScalePeriod;
PostInit();
}
public static RodShakeParam DeserializeRodShakeParam(JSONNode _json)
{
return new RodShakeParam(_json);
}
public string Animation { get; private set; }
///
/// position的振幅
///
public System.Collections.Generic.List PosAmp { get; private set; }
///
/// position的周期
单位秒
///
public System.Collections.Generic.List PosPeriod { get; private set; }
///
/// scale的振幅
///
public System.Collections.Generic.List ScaleAmp { get; private set; }
///
/// scale的周期
///
public System.Collections.Generic.List ScalePeriod { get; private set; }
public const int __ID__ = 2121057838;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "Animation:" + Animation + ","
+ "PosAmp:" + Bright.Common.StringUtil.CollectionToString(PosAmp) + ","
+ "PosPeriod:" + Bright.Common.StringUtil.CollectionToString(PosPeriod) + ","
+ "ScaleAmp:" + Bright.Common.StringUtil.CollectionToString(ScaleAmp) + ","
+ "ScalePeriod:" + Bright.Common.StringUtil.CollectionToString(ScalePeriod) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}