NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/DataTable/WeaponCfg/DataWeapon.cs

134 lines
5.2 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.WeaponCfg
{
public sealed partial class DataWeapon : Bright.Config.BeanBase
{
public DataWeapon(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["NameRead"].IsString) { throw new SerializationException(); } NameRead = _json["NameRead"]; }
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["ModelPath"].IsString) { throw new SerializationException(); } ModelPath = _json["ModelPath"]; }
{ if(!_json["BulletFlySpeed"].IsNumber) { throw new SerializationException(); } BulletFlySpeed = _json["BulletFlySpeed"]; }
{ var __json0 = _json["FireAudioId"]; if(!__json0.IsArray) { throw new SerializationException(); } FireAudioId = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FireAudioId.Add(__v0); } }
{ if(!_json["ParentPointName"].IsString) { throw new SerializationException(); } ParentPointName = _json["ParentPointName"]; }
{ if(!_json["FireEffectId"].IsNumber) { throw new SerializationException(); } FireEffectId = _json["FireEffectId"]; }
{ if(!_json["HitEffectId"].IsNumber) { throw new SerializationException(); } HitEffectId = _json["HitEffectId"]; }
{ if(!_json["CriticalHitEffectId"].IsNumber) { throw new SerializationException(); } CriticalHitEffectId = _json["CriticalHitEffectId"]; }
{ if(!_json["FlyEffectId"].IsNumber) { throw new SerializationException(); } FlyEffectId = _json["FlyEffectId"]; }
PostInit();
}
public DataWeapon(int ID, string NameRead, string Name, string ModelPath, float BulletFlySpeed, System.Collections.Generic.List<int> FireAudioId, string ParentPointName, int FireEffectId, int HitEffectId, int CriticalHitEffectId, int FlyEffectId )
{
this.ID = ID;
this.NameRead = NameRead;
this.Name = Name;
this.ModelPath = ModelPath;
this.BulletFlySpeed = BulletFlySpeed;
this.FireAudioId = FireAudioId;
this.ParentPointName = ParentPointName;
this.FireEffectId = FireEffectId;
this.HitEffectId = HitEffectId;
this.CriticalHitEffectId = CriticalHitEffectId;
this.FlyEffectId = FlyEffectId;
PostInit();
}
public static DataWeapon DeserializeDataWeapon(JSONNode _json)
{
return new WeaponCfg.DataWeapon(_json);
}
/// <summary>
/// 配置用ID
/// </summary>
public int ID { get; private set; }
/// <summary>
/// 武器名字
/// </summary>
public string NameRead { get; private set; }
/// <summary>
/// 武器展示名字
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 武器模型路径
/// </summary>
public string ModelPath { get; private set; }
/// <summary>
/// 子弹飞行速度
/// </summary>
public float BulletFlySpeed { get; private set; }
/// <summary>
/// 武器开火音效
/// </summary>
public System.Collections.Generic.List<int> FireAudioId { get; private set; }
/// <summary>
/// 武器使用挂点名字
/// </summary>
public string ParentPointName { get; private set; }
/// <summary>
/// 武器使用的开枪特效id
/// </summary>
public int FireEffectId { get; private set; }
/// <summary>
/// 武器使用的击中特效id
/// </summary>
public int HitEffectId { get; private set; }
/// <summary>
/// 武器使用的暴击击中特效id
/// </summary>
public int CriticalHitEffectId { get; private set; }
/// <summary>
/// 武器使用的弹道特效id
/// </summary>
public int FlyEffectId { get; private set; }
public const int __ID__ = -737104980;
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 + ","
+ "NameRead:" + NameRead + ","
+ "Name:" + Name + ","
+ "ModelPath:" + ModelPath + ","
+ "BulletFlySpeed:" + BulletFlySpeed + ","
+ "FireAudioId:" + Bright.Common.StringUtil.CollectionToString(FireAudioId) + ","
+ "ParentPointName:" + ParentPointName + ","
+ "FireEffectId:" + FireEffectId + ","
+ "HitEffectId:" + HitEffectId + ","
+ "CriticalHitEffectId:" + CriticalHitEffectId + ","
+ "FlyEffectId:" + FlyEffectId + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}