//------------------------------------------------------------------------------ // // 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.CharacterCfg { public sealed partial class DataCharacterBreak : Bright.Config.BeanBase { public DataCharacterBreak(JSONNode _json) { { if(!_json["RoleID"].IsNumber) { throw new SerializationException(); } RoleID = _json["RoleID"]; } { if(!_json["BreakLevel"].IsNumber) { throw new SerializationException(); } BreakLevel = _json["BreakLevel"]; } { if(!_json["IconPathLight"].IsString) { throw new SerializationException(); } IconPathLight = _json["IconPathLight"]; } { if(!_json["IconPathDark"].IsString) { throw new SerializationException(); } IconPathDark = _json["IconPathDark"]; } { if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; } { if(!_json["Attack"].IsNumber) { throw new SerializationException(); } Attack = _json["Attack"]; } { if(!_json["ShootSpeed"].IsNumber) { throw new SerializationException(); } ShootSpeed = _json["ShootSpeed"]; } { if(!_json["ManagazinContain"].IsNumber) { throw new SerializationException(); } ManagazinContain = _json["ManagazinContain"]; } { if(!_json["ChangeBulletTime"].IsNumber) { throw new SerializationException(); } ChangeBulletTime = _json["ChangeBulletTime"]; } { if(!_json["Defence"].IsNumber) { throw new SerializationException(); } Defence = _json["Defence"]; } { if(!_json["Hp"].IsNumber) { throw new SerializationException(); } Hp = _json["Hp"]; } { if(!_json["Shield"].IsNumber) { throw new SerializationException(); } Shield = _json["Shield"]; } { if(!_json["Speed"].IsNumber) { throw new SerializationException(); } Speed = _json["Speed"]; } { if(!_json["ShootRange"].IsNumber) { throw new SerializationException(); } ShootRange = _json["ShootRange"]; } { if(!_json["YaZhi"].IsNumber) { throw new SerializationException(); } YaZhi = _json["YaZhi"]; } { if(!_json["Corrage"].IsNumber) { throw new SerializationException(); } Corrage = _json["Corrage"]; } { if(!_json["CorrageRecover"].IsNumber) { throw new SerializationException(); } CorrageRecover = _json["CorrageRecover"]; } { if(!_json["DamageToHuman"].IsNumber) { throw new SerializationException(); } DamageToHuman = _json["DamageToHuman"]; } { if(!_json["DamageToCarrier"].IsNumber) { throw new SerializationException(); } DamageToCarrier = _json["DamageToCarrier"]; } { if(!_json["CriticalRatio"].IsNumber) { throw new SerializationException(); } CriticalRatio = _json["CriticalRatio"]; } { if(!_json["CriticalDamage"].IsNumber) { throw new SerializationException(); } CriticalDamage = _json["CriticalDamage"]; } { if(!_json["LevelLimit"].IsNumber) { throw new SerializationException(); } LevelLimit = _json["LevelLimit"]; } { if(!_json["PassiveSkillID"].IsNumber) { throw new SerializationException(); } PassiveSkillID = _json["PassiveSkillID"]; } { var __json0 = _json["CostItems"]; if(!__json0.IsArray) { throw new SerializationException(); } CostItems = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { item.ItemCounts __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = item.ItemCounts.DeserializeItemCounts(__e0); } CostItems.Add(__v0); } } PostInit(); } public DataCharacterBreak(int RoleID, int BreakLevel, string IconPathLight, string IconPathDark, string Name, int Attack, float ShootSpeed, int ManagazinContain, float ChangeBulletTime, int Defence, int Hp, int Shield, float Speed, float ShootRange, float YaZhi, float Corrage, float CorrageRecover, float DamageToHuman, float DamageToCarrier, float CriticalRatio, float CriticalDamage, int LevelLimit, int PassiveSkillID, System.Collections.Generic.List CostItems ) { this.RoleID = RoleID; this.BreakLevel = BreakLevel; this.IconPathLight = IconPathLight; this.IconPathDark = IconPathDark; this.Name = Name; this.Attack = Attack; this.ShootSpeed = ShootSpeed; this.ManagazinContain = ManagazinContain; this.ChangeBulletTime = ChangeBulletTime; this.Defence = Defence; this.Hp = Hp; this.Shield = Shield; this.Speed = Speed; this.ShootRange = ShootRange; this.YaZhi = YaZhi; this.Corrage = Corrage; this.CorrageRecover = CorrageRecover; this.DamageToHuman = DamageToHuman; this.DamageToCarrier = DamageToCarrier; this.CriticalRatio = CriticalRatio; this.CriticalDamage = CriticalDamage; this.LevelLimit = LevelLimit; this.PassiveSkillID = PassiveSkillID; this.CostItems = CostItems; PostInit(); } public static DataCharacterBreak DeserializeDataCharacterBreak(JSONNode _json) { return new CharacterCfg.DataCharacterBreak(_json); } /// /// 配置用ID /// public int RoleID { get; private set; } /// /// 突破等级 /// public int BreakLevel { get; private set; } /// /// 图片路径 /// public string IconPathLight { get; private set; } /// /// 图片路径 /// public string IconPathDark { get; private set; } /// /// 名字 /// public string Name { get; private set; } /// /// 攻击力 /// public int Attack { get; private set; } /// /// 射速 /// public float ShootSpeed { get; private set; } /// /// 弹匣容量 /// public int ManagazinContain { get; private set; } /// /// 换弹时间 /// public float ChangeBulletTime { get; private set; } /// /// 防御力 /// public int Defence { get; private set; } /// /// 血量 /// public int Hp { get; private set; } /// /// 护盾 /// public int Shield { get; private set; } /// /// 移速 /// public float Speed { get; private set; } /// /// 射程 /// public float ShootRange { get; private set; } /// /// 压制 /// public float YaZhi { get; private set; } /// /// 士气 /// public float Corrage { get; private set; } /// /// 士气恢复 /// public float CorrageRecover { get; private set; } /// /// 对人伤害 /// public float DamageToHuman { get; private set; } /// /// 对载具伤害 /// public float DamageToCarrier { get; private set; } /// /// 暴击率 /// public float CriticalRatio { get; private set; } /// /// 暴击伤害 /// public float CriticalDamage { get; private set; } /// /// 等级上限 /// public int LevelLimit { get; private set; } /// /// 被动技能ID /// public int PassiveSkillID { get; private set; } /// /// 消耗道具 /// public System.Collections.Generic.List CostItems { get; private set; } public const int __ID__ = -1329496589; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { foreach(var _e in CostItems) { _e?.Resolve(_tables); } PostResolve(); } public void TranslateText(System.Func translator) { foreach(var _e in CostItems) { _e?.TranslateText(translator); } } public override string ToString() { return "{ " + "RoleID:" + RoleID + "," + "BreakLevel:" + BreakLevel + "," + "IconPathLight:" + IconPathLight + "," + "IconPathDark:" + IconPathDark + "," + "Name:" + Name + "," + "Attack:" + Attack + "," + "ShootSpeed:" + ShootSpeed + "," + "ManagazinContain:" + ManagazinContain + "," + "ChangeBulletTime:" + ChangeBulletTime + "," + "Defence:" + Defence + "," + "Hp:" + Hp + "," + "Shield:" + Shield + "," + "Speed:" + Speed + "," + "ShootRange:" + ShootRange + "," + "YaZhi:" + YaZhi + "," + "Corrage:" + Corrage + "," + "CorrageRecover:" + CorrageRecover + "," + "DamageToHuman:" + DamageToHuman + "," + "DamageToCarrier:" + DamageToCarrier + "," + "CriticalRatio:" + CriticalRatio + "," + "CriticalDamage:" + CriticalDamage + "," + "LevelLimit:" + LevelLimit + "," + "PassiveSkillID:" + PassiveSkillID + "," + "CostItems:" + Bright.Common.StringUtil.CollectionToString(CostItems) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }