From fd723daa788368f4877cbe8fc96c476437042829 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Sat, 13 Jun 2026 12:04:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=A0=E9=99=A4=20PlatformEntity?= =?UTF-8?q?/BuildFireUnits=20=E4=B8=AD=E7=9A=84=E9=80=9F=E5=BA=A6/?= =?UTF-8?q?=E5=88=9D=E9=80=9F/=E9=AB=98=E5=BA=A6=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PlatformEntity: MuzzleVelocity/CruiseSpeed/ReleaseAltitude 默认 0,由 Planner 校验 - BuildFireUnits: 同上,不再硬写 800f/55f/1000f - MunitionCount 默认从 3 改为 1 - 35 测试通过 --- src/CounterDrone.Core/Simulation/PlatformEntity.cs | 8 ++++---- src/CounterDrone.Core/Simulation/SimulationEngine.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CounterDrone.Core/Simulation/PlatformEntity.cs b/src/CounterDrone.Core/Simulation/PlatformEntity.cs index 95f09d2..4902c27 100644 --- a/src/CounterDrone.Core/Simulation/PlatformEntity.cs +++ b/src/CounterDrone.Core/Simulation/PlatformEntity.cs @@ -45,11 +45,11 @@ namespace CounterDrone.Core.Simulation PosY = (float)config.PositionY; PosZ = (float)config.PositionZ; AerosolType = config.AerosolType.HasValue ? (AerosolType?)config.AerosolType.Value : null; - MunitionCount = config.MunitionCount ?? 3; + MunitionCount = config.MunitionCount ?? 1; Cooldown = (float)config.Cooldown; - MuzzleVelocity = (float)(config.MuzzleVelocity ?? 800f); - CruiseSpeed = (float)(config.CruiseSpeed ?? 55f); - ReleaseAltitude = (float)(config.ReleaseAltitude ?? 1000f); + MuzzleVelocity = (float)(config.MuzzleVelocity ?? 0f); + CruiseSpeed = (float)(config.CruiseSpeed ?? 0f); + ReleaseAltitude = (float)(config.ReleaseAltitude ?? 0f); PatrolX = PosX; PatrolY = PosY; diff --git a/src/CounterDrone.Core/Simulation/SimulationEngine.cs b/src/CounterDrone.Core/Simulation/SimulationEngine.cs index a66ffc9..151b589 100644 --- a/src/CounterDrone.Core/Simulation/SimulationEngine.cs +++ b/src/CounterDrone.Core/Simulation/SimulationEngine.cs @@ -313,9 +313,9 @@ namespace CounterDrone.Core.Simulation Type = (PlatformType)(eq.PlatformType ?? (int)PlatformType.GroundBased), Position = new Algorithms.Vector3((float)eq.PositionX + i * 50, (float)eq.PositionY, (float)eq.PositionZ), GunCount = 1, ChannelsPerGun = 1, ChannelInterval = (float)(eq.ChannelInterval ?? 1), - CruiseSpeed = (float)(eq.CruiseSpeed ?? 55f), - ReleaseAltitude = (float)(eq.ReleaseAltitude ?? 1000f), - MuzzleVelocity = (float)(eq.MuzzleVelocity ?? 800f), + CruiseSpeed = (float)(eq.CruiseSpeed ?? 0f), + ReleaseAltitude = (float)(eq.ReleaseAltitude ?? 0f), + MuzzleVelocity = (float)(eq.MuzzleVelocity ?? 0f), // 总弹药均分到每个通道 TotalMunitions = (eq.MunitionCount ?? 1) / (gunCount * chPerGun), AmmoTypes = new List { (AerosolType)(eq.AerosolType ?? 0) },