NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/DataTable/BulletCfg/DataBullet.cs

127 lines
4.7 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace cfg.BulletCfg
{
public sealed partial class DataBullet : Bright.Config.BeanBase
{
public DataBullet(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["BulletType"].IsNumber) { throw new SerializationException(); } BulletType = _json["BulletType"]; }
{ if(!_json["PrefabPath"].IsString) { throw new SerializationException(); } PrefabPath = _json["PrefabPath"]; }
{ if(!_json["HitAudioId"].IsNumber) { throw new SerializationException(); } HitAudioId = _json["HitAudioId"]; }
{ if(!_json["DestroyEffectId"].IsNumber) { throw new SerializationException(); } DestroyEffectId = _json["DestroyEffectId"]; }
{ if(!_json["FlySpeed"].IsNumber) { throw new SerializationException(); } FlySpeed = _json["FlySpeed"]; }
{ if(!_json["FilterType"].IsNumber) { throw new SerializationException(); } FilterType = (SkillCfg.ETargetType)_json["FilterType"].AsInt; }
{ if(!_json["AreaId"].IsNumber) { throw new SerializationException(); } AreaId = _json["AreaId"]; }
{ var __json0 = _json["BuffList"]; if(!__json0.IsArray) { throw new SerializationException(); } BuffList = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } BuffList.Add(__v0); } }
PostInit();
}
public DataBullet(int ID, string Name, int BulletType, string PrefabPath, int HitAudioId, int DestroyEffectId, float FlySpeed, SkillCfg.ETargetType FilterType, int AreaId, System.Collections.Generic.List<int> BuffList )
{
this.ID = ID;
this.Name = Name;
this.BulletType = BulletType;
this.PrefabPath = PrefabPath;
this.HitAudioId = HitAudioId;
this.DestroyEffectId = DestroyEffectId;
this.FlySpeed = FlySpeed;
this.FilterType = FilterType;
this.AreaId = AreaId;
this.BuffList = BuffList;
PostInit();
}
public static DataBullet DeserializeDataBullet(JSONNode _json)
{
return new BulletCfg.DataBullet(_json);
}
/// <summary>
/// 配置用ID
/// </summary>
public int ID { get; private set; }
/// <summary>
/// 子弹名字
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 子弹类型
/// </summary>
public int BulletType { get; private set; }
/// <summary>
/// 子弹模型
/// </summary>
public string PrefabPath { get; private set; }
/// <summary>
/// 子弹击中目标音效
/// </summary>
public int HitAudioId { get; private set; }
/// <summary>
/// 销毁特效id
/// </summary>
public int DestroyEffectId { get; private set; }
/// <summary>
/// 子弹飞行速度
/// </summary>
public float FlySpeed { get; private set; }
/// <summary>
/// 子弹初筛目标类型
/// </summary>
public SkillCfg.ETargetType FilterType { get; private set; }
/// <summary>
/// 子弹生效区域id
/// </summary>
public int AreaId { get; private set; }
/// <summary>
/// 子弹携带buff列表
/// </summary>
public System.Collections.Generic.List<int> BuffList { get; private set; }
public const int __ID__ = 110094072;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Name:" + Name + ","
+ "BulletType:" + BulletType + ","
+ "PrefabPath:" + PrefabPath + ","
+ "HitAudioId:" + HitAudioId + ","
+ "DestroyEffectId:" + DestroyEffectId + ","
+ "FlySpeed:" + FlySpeed + ","
+ "FilterType:" + FilterType + ","
+ "AreaId:" + AreaId + ","
+ "BuffList:" + Bright.Common.StringUtil.CollectionToString(BuffList) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}