//------------------------------------------------------------------------------ // // 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.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(__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 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); } /// /// 配置用ID /// public int ID { get; private set; } /// /// 武器名字 /// public string NameRead { get; private set; } /// /// 武器展示名字 /// public string Name { get; private set; } /// /// 武器模型路径 /// public string ModelPath { get; private set; } /// /// 子弹飞行速度 /// public float BulletFlySpeed { get; private set; } /// /// 武器开火音效 /// public System.Collections.Generic.List FireAudioId { get; private set; } /// /// 武器使用挂点名字 /// public string ParentPointName { get; private set; } /// /// 武器使用的开枪特效id /// public int FireEffectId { get; private set; } /// /// 武器使用的击中特效id /// public int HitEffectId { get; private set; } /// /// 武器使用的暴击击中特效id /// public int CriticalHitEffectId { get; private set; } /// /// 武器使用的弹道特效id /// public int FlyEffectId { get; private set; } public const int __ID__ = -737104980; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func 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(); } }