//------------------------------------------------------------------------------ // // 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.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(__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 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); } /// /// 配置用ID /// public int ID { get; private set; } /// /// 子弹名字 /// public string Name { get; private set; } /// /// 子弹类型 /// public int BulletType { get; private set; } /// /// 子弹模型 /// public string PrefabPath { get; private set; } /// /// 子弹击中目标音效 /// public int HitAudioId { get; private set; } /// /// 销毁特效id /// public int DestroyEffectId { get; private set; } /// /// 子弹飞行速度 /// public float FlySpeed { get; private set; } /// /// 子弹初筛目标类型 /// public SkillCfg.ETargetType FilterType { get; private set; } /// /// 子弹生效区域id /// public int AreaId { get; private set; } /// /// 子弹携带buff列表 /// public System.Collections.Generic.List BuffList { get; private set; } public const int __ID__ = 110094072; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func 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(); } }