//------------------------------------------------------------------------------
//
// 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 Crossbow : Bright.Config.BeanBase
{
public JSONNode json;
public Crossbow(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["FishCrossbowFbx"].IsString) { throw new SerializationException(); } FishCrossbowFbx = _json["FishCrossbowFbx"]; }
{ if(!_json["CrossbowFbx"].IsString) { throw new SerializationException(); } CrossbowFbx = _json["CrossbowFbx"]; }
{ if(!_json["AimIndex"].IsNumber) { throw new SerializationException(); } AimIndex = _json["AimIndex"]; }
{ if(!_json["AimTime"].IsNumber) { throw new SerializationException(); } AimTime = _json["AimTime"]; }
{ if(!_json["TimescaleRate"].IsNumber) { throw new SerializationException(); } TimescaleRate = _json["TimescaleRate"]; }
{ if(!_json["AimFov"].IsNumber) { throw new SerializationException(); } AimFov = _json["AimFov"]; }
{ var __json0 = _json["ShakeSpeed"]; if(!__json0.IsArray) { throw new SerializationException(); } ShakeSpeed = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ShakeSpeed.Add(__v0); } }
{ var __json0 = _json["ShakeRandRange"]; if(!__json0.IsArray) { throw new SerializationException(); } ShakeRandRange = new System.Collections.Generic.List>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { System.Collections.Generic.List __v0; { var __json1 = __e0; if(!__json1.IsArray) { throw new SerializationException(); } __v0 = new System.Collections.Generic.List(__json1.Count); foreach(JSONNode __e1 in __json1.Children) { float __v1; { if(!__e1.IsNumber) { throw new SerializationException(); } __v1 = __e1; } __v0.Add(__v1); } } ShakeRandRange.Add(__v0); } }
json = _json;
PostInit();
}
public Crossbow(int ID, string FishCrossbowFbx, string CrossbowFbx, int AimIndex, float AimTime, float TimescaleRate, float AimFov, System.Collections.Generic.List ShakeSpeed, System.Collections.Generic.List> ShakeRandRange )
{
this.ID = ID;
this.FishCrossbowFbx = FishCrossbowFbx;
this.CrossbowFbx = CrossbowFbx;
this.AimIndex = AimIndex;
this.AimTime = AimTime;
this.TimescaleRate = TimescaleRate;
this.AimFov = AimFov;
this.ShakeSpeed = ShakeSpeed;
this.ShakeRandRange = ShakeRandRange;
PostInit();
}
public static Crossbow DeserializeCrossbow(JSONNode _json)
{
return new Crossbow(_json);
}
public int ID { get; private set; }
///
/// F_开头的鱼模型
///
public string FishCrossbowFbx { get; private set; }
///
/// 包括:缩放、弩模型、弩箭、手位置
///
public string CrossbowFbx { get; private set; }
///
/// 从1到4,越来越慢
///
public int AimIndex { get; private set; }
///
/// 2.5-6秒
///
public float AimTime { get; private set; }
///
/// 倍数,在0-1之间
///
public float TimescaleRate { get; private set; }
///
/// 随着镜头推进而进入该FOV
///
public float AimFov { get; private set; }
///
/// 每秒移动这么多unity单位
固定值,上下限会随着时间变化
///
public System.Collections.Generic.List ShakeSpeed { get; private set; }
///
/// unity单位,在第一个数和第二个数之间随机
随机的上下限会随着时间变化
///
public System.Collections.Generic.List> ShakeRandRange { get; private set; }
public const int __ID__ = -2107022934;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "FishCrossbowFbx:" + FishCrossbowFbx + ","
+ "CrossbowFbx:" + CrossbowFbx + ","
+ "AimIndex:" + AimIndex + ","
+ "AimTime:" + AimTime + ","
+ "TimescaleRate:" + TimescaleRate + ","
+ "AimFov:" + AimFov + ","
+ "ShakeSpeed:" + Bright.Common.StringUtil.CollectionToString(ShakeSpeed) + ","
+ "ShakeRandRange:" + Bright.Common.StringUtil.CollectionToString(ShakeRandRange) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}