using System; using Definition.Enum; namespace Entity.EntityData { [Serializable] public sealed class WeaponLanceParamsData { /// /// 横向半宽,表示前戳矩形判定的一半宽度。 /// public float HitHalfWidth { get; set; } /// /// 旧字段兼容,未配置 HitHalfWidth 时回退使用。 /// public float HitRadius { get; set; } /// /// 前戳判定盒体的总高度。 /// public float HitHeight { get; set; } /// /// 判定盒体中心相对战斗平面的高度偏移。 /// public float HitCenterYOffset { get; set; } /// /// 前刺距离,同时驱动武器位移和命中长度。 /// public float PierceLength { get; set; } /// /// 旧字段兼容,未配置 PierceLength 时回退使用。 /// public float ThrustDistance { get; set; } /// /// 判定起点相对武器当前位置的前置偏移。 /// public float ForwardOffset { get; set; } /// /// 追踪目标时的转向速度。 /// public float RotateSpeed { get; set; } /// /// 向前突刺阶段耗时。 /// public float AttackDuration { get; set; } /// /// 收枪返回阶段耗时。 /// public float ReturnDuration { get; set; } } [Serializable] public class WeaponLanceData : WeaponData { public WeaponLanceParamsData ParamsData { get; } public WeaponLanceData(int entityId, int ownerId, CampType ownerCamp) : base(entityId, WeaponType.WeaponLance, ownerId, ownerCamp) { ParamsData = ParseParams(); } } }