253 lines
12 KiB
C#
253 lines
12 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.VehicleCfg
|
|
{
|
|
|
|
public sealed partial class DataVehicle : Bright.Config.BeanBase
|
|
{
|
|
public DataVehicle(JSONNode _json)
|
|
{
|
|
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
|
|
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
|
|
{ if(!_json["PrefabPath"].IsString) { throw new SerializationException(); } PrefabPath = _json["PrefabPath"]; }
|
|
{ if(!_json["TireMarkId"].IsNumber) { throw new SerializationException(); } TireMarkId = _json["TireMarkId"]; }
|
|
{ if(!_json["StandCrossLevel"].IsNumber) { throw new SerializationException(); } StandCrossLevel = _json["StandCrossLevel"]; }
|
|
{ if(!_json["MoveCrossLevel"].IsNumber) { throw new SerializationException(); } MoveCrossLevel = _json["MoveCrossLevel"]; }
|
|
{ if(!_json["SeatCount"].IsNumber) { throw new SerializationException(); } SeatCount = _json["SeatCount"]; }
|
|
{ var __json0 = _json["Damages"]; if(!__json0.IsArray) { throw new SerializationException(); } Damages = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Damages.Add(__v0); } }
|
|
{ var __json0 = _json["Defenses"]; if(!__json0.IsArray) { throw new SerializationException(); } Defenses = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Defenses.Add(__v0); } }
|
|
{ var __json0 = _json["Hps"]; if(!__json0.IsArray) { throw new SerializationException(); } Hps = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Hps.Add(__v0); } }
|
|
{ var __json0 = _json["Shields"]; if(!__json0.IsArray) { throw new SerializationException(); } Shields = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Shields.Add(__v0); } }
|
|
{ if(!_json["BulletCount"].IsNumber) { throw new SerializationException(); } BulletCount = _json["BulletCount"]; }
|
|
{ if(!_json["AttackShiledScale"].IsNumber) { throw new SerializationException(); } AttackShiledScale = _json["AttackShiledScale"]; }
|
|
{ if(!_json["AttackHpScale"].IsNumber) { throw new SerializationException(); } AttackHpScale = _json["AttackHpScale"]; }
|
|
{ if(!_json["FirstShootTime"].IsNumber) { throw new SerializationException(); } FirstShootTime = _json["FirstShootTime"]; }
|
|
{ if(!_json["PerShootCount"].IsNumber) { throw new SerializationException(); } PerShootCount = _json["PerShootCount"]; }
|
|
{ if(!_json["WeaponId"].IsNumber) { throw new SerializationException(); } WeaponId = _json["WeaponId"]; }
|
|
{ if(!_json["ReloadTime"].IsNumber) { throw new SerializationException(); } ReloadTime = _json["ReloadTime"]; }
|
|
{ if(!_json["FireRate"].IsNumber) { throw new SerializationException(); } FireRate = _json["FireRate"]; }
|
|
{ if(!_json["MoveSpeed"].IsNumber) { throw new SerializationException(); } MoveSpeed = _json["MoveSpeed"]; }
|
|
{ if(!_json["BatteryTurnSpeed"].IsNumber) { throw new SerializationException(); } BatteryTurnSpeed = _json["BatteryTurnSpeed"]; }
|
|
{ if(!_json["TurnSpeed"].IsNumber) { throw new SerializationException(); } TurnSpeed = _json["TurnSpeed"]; }
|
|
{ if(!_json["AttackDistance"].IsNumber) { throw new SerializationException(); } AttackDistance = _json["AttackDistance"]; }
|
|
{ if(!_json["MoraleDamage"].IsNumber) { throw new SerializationException(); } MoraleDamage = _json["MoraleDamage"]; }
|
|
{ if(!_json["ScaleForHuman"].IsNumber) { throw new SerializationException(); } ScaleForHuman = _json["ScaleForHuman"]; }
|
|
{ if(!_json["ScaleForVehicle"].IsNumber) { throw new SerializationException(); } ScaleForVehicle = _json["ScaleForVehicle"]; }
|
|
{ if(!_json["CriticalRate"].IsNumber) { throw new SerializationException(); } CriticalRate = _json["CriticalRate"]; }
|
|
{ if(!_json["CriticalScale"].IsNumber) { throw new SerializationException(); } CriticalScale = _json["CriticalScale"]; }
|
|
PostInit();
|
|
}
|
|
|
|
public DataVehicle(int ID, string Name, string PrefabPath, int TireMarkId, int StandCrossLevel, int MoveCrossLevel, int SeatCount, System.Collections.Generic.List<int> Damages, System.Collections.Generic.List<int> Defenses, System.Collections.Generic.List<int> Hps, System.Collections.Generic.List<int> Shields, int BulletCount, float AttackShiledScale, float AttackHpScale, float FirstShootTime, int PerShootCount, int WeaponId, float ReloadTime, int FireRate, float MoveSpeed, float BatteryTurnSpeed, float TurnSpeed, int AttackDistance, int MoraleDamage, float ScaleForHuman, float ScaleForVehicle, float CriticalRate, float CriticalScale )
|
|
{
|
|
this.ID = ID;
|
|
this.Name = Name;
|
|
this.PrefabPath = PrefabPath;
|
|
this.TireMarkId = TireMarkId;
|
|
this.StandCrossLevel = StandCrossLevel;
|
|
this.MoveCrossLevel = MoveCrossLevel;
|
|
this.SeatCount = SeatCount;
|
|
this.Damages = Damages;
|
|
this.Defenses = Defenses;
|
|
this.Hps = Hps;
|
|
this.Shields = Shields;
|
|
this.BulletCount = BulletCount;
|
|
this.AttackShiledScale = AttackShiledScale;
|
|
this.AttackHpScale = AttackHpScale;
|
|
this.FirstShootTime = FirstShootTime;
|
|
this.PerShootCount = PerShootCount;
|
|
this.WeaponId = WeaponId;
|
|
this.ReloadTime = ReloadTime;
|
|
this.FireRate = FireRate;
|
|
this.MoveSpeed = MoveSpeed;
|
|
this.BatteryTurnSpeed = BatteryTurnSpeed;
|
|
this.TurnSpeed = TurnSpeed;
|
|
this.AttackDistance = AttackDistance;
|
|
this.MoraleDamage = MoraleDamage;
|
|
this.ScaleForHuman = ScaleForHuman;
|
|
this.ScaleForVehicle = ScaleForVehicle;
|
|
this.CriticalRate = CriticalRate;
|
|
this.CriticalScale = CriticalScale;
|
|
PostInit();
|
|
}
|
|
|
|
public static DataVehicle DeserializeDataVehicle(JSONNode _json)
|
|
{
|
|
return new VehicleCfg.DataVehicle(_json);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 配置用ID
|
|
/// </summary>
|
|
public int ID { get; private set; }
|
|
/// <summary>
|
|
/// 载具名字
|
|
/// </summary>
|
|
public string Name { get; private set; }
|
|
/// <summary>
|
|
/// 模型路径
|
|
/// </summary>
|
|
public string PrefabPath { get; private set; }
|
|
/// <summary>
|
|
/// 轮胎印使用配置id
|
|
/// </summary>
|
|
public int TireMarkId { get; private set; }
|
|
/// <summary>
|
|
/// 占位的通行级别
|
|
/// </summary>
|
|
public int StandCrossLevel { get; private set; }
|
|
/// <summary>
|
|
/// 可通行级别
|
|
/// </summary>
|
|
public int MoveCrossLevel { get; private set; }
|
|
/// <summary>
|
|
/// 载人数量
|
|
/// </summary>
|
|
public int SeatCount { get; private set; }
|
|
/// <summary>
|
|
/// 伤害
|
|
/// </summary>
|
|
public System.Collections.Generic.List<int> Damages { get; private set; }
|
|
/// <summary>
|
|
/// 防御力
|
|
/// </summary>
|
|
public System.Collections.Generic.List<int> Defenses { get; private set; }
|
|
/// <summary>
|
|
/// 血量
|
|
/// </summary>
|
|
public System.Collections.Generic.List<int> Hps { get; private set; }
|
|
/// <summary>
|
|
/// 护甲
|
|
/// </summary>
|
|
public System.Collections.Generic.List<int> Shields { get; private set; }
|
|
/// <summary>
|
|
/// 弹夹容量
|
|
/// </summary>
|
|
public int BulletCount { get; private set; }
|
|
/// <summary>
|
|
/// 穿甲系数
|
|
/// </summary>
|
|
public float AttackShiledScale { get; private set; }
|
|
/// <summary>
|
|
/// 杀伤系数
|
|
/// </summary>
|
|
public float AttackHpScale { get; private set; }
|
|
/// <summary>
|
|
/// 第一次开枪
|
|
/// </summary>
|
|
public float FirstShootTime { get; private set; }
|
|
/// <summary>
|
|
/// 每次发射子弹数量
|
|
/// </summary>
|
|
public int PerShootCount { get; private set; }
|
|
/// <summary>
|
|
/// 武器Id
|
|
/// </summary>
|
|
public int WeaponId { get; private set; }
|
|
/// <summary>
|
|
/// 换弹时间
|
|
/// </summary>
|
|
public float ReloadTime { get; private set; }
|
|
/// <summary>
|
|
/// 射速
|
|
/// </summary>
|
|
public int FireRate { get; private set; }
|
|
/// <summary>
|
|
/// 移速
|
|
/// </summary>
|
|
public float MoveSpeed { get; private set; }
|
|
/// <summary>
|
|
/// 炮台转身速度
|
|
/// </summary>
|
|
public float BatteryTurnSpeed { get; private set; }
|
|
/// <summary>
|
|
/// 转身速度
|
|
/// </summary>
|
|
public float TurnSpeed { get; private set; }
|
|
/// <summary>
|
|
/// 射程
|
|
/// </summary>
|
|
public int AttackDistance { get; private set; }
|
|
/// <summary>
|
|
/// 压制
|
|
/// </summary>
|
|
public int MoraleDamage { get; private set; }
|
|
/// <summary>
|
|
/// 对人伤害
|
|
/// </summary>
|
|
public float ScaleForHuman { get; private set; }
|
|
/// <summary>
|
|
/// 对载具伤害
|
|
/// </summary>
|
|
public float ScaleForVehicle { get; private set; }
|
|
/// <summary>
|
|
/// 暴击率
|
|
/// </summary>
|
|
public float CriticalRate { get; private set; }
|
|
/// <summary>
|
|
/// 暴击伤害
|
|
/// </summary>
|
|
public float CriticalScale { get; private set; }
|
|
|
|
public const int __ID__ = -1552309044;
|
|
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 + ","
|
|
+ "PrefabPath:" + PrefabPath + ","
|
|
+ "TireMarkId:" + TireMarkId + ","
|
|
+ "StandCrossLevel:" + StandCrossLevel + ","
|
|
+ "MoveCrossLevel:" + MoveCrossLevel + ","
|
|
+ "SeatCount:" + SeatCount + ","
|
|
+ "Damages:" + Bright.Common.StringUtil.CollectionToString(Damages) + ","
|
|
+ "Defenses:" + Bright.Common.StringUtil.CollectionToString(Defenses) + ","
|
|
+ "Hps:" + Bright.Common.StringUtil.CollectionToString(Hps) + ","
|
|
+ "Shields:" + Bright.Common.StringUtil.CollectionToString(Shields) + ","
|
|
+ "BulletCount:" + BulletCount + ","
|
|
+ "AttackShiledScale:" + AttackShiledScale + ","
|
|
+ "AttackHpScale:" + AttackHpScale + ","
|
|
+ "FirstShootTime:" + FirstShootTime + ","
|
|
+ "PerShootCount:" + PerShootCount + ","
|
|
+ "WeaponId:" + WeaponId + ","
|
|
+ "ReloadTime:" + ReloadTime + ","
|
|
+ "FireRate:" + FireRate + ","
|
|
+ "MoveSpeed:" + MoveSpeed + ","
|
|
+ "BatteryTurnSpeed:" + BatteryTurnSpeed + ","
|
|
+ "TurnSpeed:" + TurnSpeed + ","
|
|
+ "AttackDistance:" + AttackDistance + ","
|
|
+ "MoraleDamage:" + MoraleDamage + ","
|
|
+ "ScaleForHuman:" + ScaleForHuman + ","
|
|
+ "ScaleForVehicle:" + ScaleForVehicle + ","
|
|
+ "CriticalRate:" + CriticalRate + ","
|
|
+ "CriticalScale:" + CriticalScale + ","
|
|
+ "}";
|
|
}
|
|
|
|
partial void PostInit();
|
|
partial void PostResolve();
|
|
}
|
|
}
|