//------------------------------------------------------------------------------
//
// 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 Luban;
using SimpleJSON;
namespace cfg
{
public sealed partial class TurretResources : Luban.BeanBase
{
public TurretResources(JSONNode _buf)
{
{ if(!_buf["turretNumber"].IsNumber) { throw new SerializationException(); } TurretNumber = _buf["turretNumber"]; }
{ if(!_buf["turretType"].IsNumber) { throw new SerializationException(); } TurretType = _buf["turretType"]; }
{ if(!_buf["prefabTurretResourcesPath"].IsString) { throw new SerializationException(); } PrefabTurretResourcesPath = _buf["prefabTurretResourcesPath"]; }
{ if(!_buf["animationType"].IsNumber) { throw new SerializationException(); } AnimationType = _buf["animationType"]; }
{ if(!_buf["attackAudioID"].IsNumber) { throw new SerializationException(); } AttackAudioID = _buf["attackAudioID"]; }
{ var __json0 = _buf["bulletID"]; if(!__json0.IsArray) { throw new SerializationException(); } BulletID = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } BulletID.Add(__v0); } }
}
public static TurretResources DeserializeTurretResources(JSONNode _buf)
{
return new TurretResources(_buf);
}
///
/// 炮台编号
///
public readonly int TurretNumber;
///
/// 类型 1普通炮台 2战神 3翅膀
///
public readonly int TurretType;
///
/// 预制体名字
///
public readonly string PrefabTurretResourcesPath;
///
/// 动画类型1spine 2animator 3 animation
///
public readonly int AnimationType;
///
/// 攻击音效
///
public readonly int AttackAudioID;
///
/// 子弹ID
///
public readonly System.Collections.Generic.List BulletID;
public const int __ID__ = -896453899;
public override int GetTypeId() => __ID__;
public void ResolveRef(Tables tables)
{
}
public override string ToString()
{
return "{ "
+ "turretNumber:" + TurretNumber + ","
+ "turretType:" + TurretType + ","
+ "prefabTurretResourcesPath:" + PrefabTurretResourcesPath + ","
+ "animationType:" + AnimationType + ","
+ "attackAudioID:" + AttackAudioID + ","
+ "bulletID:" + Luban.StringUtil.CollectionToString(BulletID) + ","
+ "}";
}
}
}