diff --git a/docs/design/technical/仿真器实体与事件映射.md b/docs/design/technical/仿真器实体与事件映射.md index 2430727..fc833c0 100644 --- a/docs/design/technical/仿真器实体与事件映射.md +++ b/docs/design/technical/仿真器实体与事件映射.md @@ -5,8 +5,8 @@ | 实体 | 类 | 生命周期 | 主要属性 | |------|------|------|------| | 无人机 | `DroneEntity` | 仿真全程 | Pos, Hp, Status, Route, ExposureTime | -| 发射平台 | `PlatformEntity` | 仿真全程 | Pos, PlatformType, AerosolType, MunitionCount, Cooldown | -| 飞行弹药 | `MunitionEntity` | 发射→到达释放高度 | Pos, LaunchMode, Target, HasArrived | +| 发射平台 | `PlatformEntity` | 仿真全程 | Pos, PlatformType, State(Idle/FlyingToTarget/ReadyToRelease), AerosolType, MunitionCount, Cooldown, CruiseSpeed, MuzzleVelocity, CurrentVelocity | +| 飞行弹药 | `MunitionEntity` | 发射→到达释放高度 | Pos, LaunchMode(AirDrop/GroundArtillery), Target, HasArrived, 空基载机速度矢量 | | 气溶胶云团 | `CloudEntity` | 弹药到达→消散 | Center, Radius, CoreDensity, IsDissipated | | 管控区域 | `ControlZoneEntity` | 仿真全程 | Vertices, Min/MaxAltitude | @@ -35,33 +35,45 @@ ## 数据流 ``` -FireSchedule (算法输出) +想定配置(EquipmentDeployment + TargetConfig + RoutePlan + CombatScene) + │ + ▼ +SimulationEngine.Initialize() + │ + ├─ BuildFireUnits() → List + ├─ BuildDroneGroups() → List + │ + ▼ +IDefensePlanner.Plan(fireUnits, threats, scene) + │ + ├─ 五步流水线 → FireSchedule(发射计划) │ ▼ SimulationEngine.Tick() │ - ├─ 时间到达 → PlatformEntity.Fire() → MunitionEntity 创建 - │ │ - │ ├─ OnMunitionLaunched ──→ Unity: 炮弹 3D 模型 - │ │ - │ └─ 飞行 → 到达释放高度 - │ │ - │ ├─ CloudEntity 创建 - │ │ - │ ├─ OnCloudGenerated ──→ Unity: 粒子系统 - │ │ - │ └─ 扩散 → 毁伤判定 - │ │ - │ ├─ DroneEntity.Hp -= dmg - │ │ - │ └─ HP≤0 → OnDroneDestroyed ──→ Unity: 爆炸动画 + ├─ 【地基】时间到达 → PlatformEntity.Release() → MunitionEntity 创建 + │ └─ OnMunitionLaunched ──→ Unity: 炮弹 3D 模型 + │ + ├─ 【空基】时间到达 → PlatformEntity.CommandFlyTo() → 飞行中 → CanRelease + │ └─ Release() → MunitionEntity(AirDrop, 载机速度) → OnMunitionLaunched + │ └─ OnMunitionLaunched ──→ Unity: 空基投放 + │ + ├─ MunitionEntity 飞行 → 到达释放高度 + │ ├─ 地基:抛物线弹道(Kinematics.ParabolicPosition) + │ └─ 空基:载机速度 + 重力(Kinematics.AirDropPosition) + │ │ + │ ├─ CloudEntity 创建 + │ ├─ OnCloudGenerated ──→ Unity: 粒子系统 + │ └─ 扩散 → 毁伤判定 + │ ├─ DroneEntity.Hp -= dmg + │ └─ HP≤0 → OnDroneDestroyed ──→ Unity: 爆炸动画 │ ├─ DroneEntity.Update() → 到达终点 - │ └─ OnDroneReachedTarget ──→ Unity: 抵达提示 + │ └─ OnDroneReachedTarget ──→ Unity: 抵达提示 │ ├─ ControlZone.ContainsPoint() - │ └─ OnZoneIntruded ──→ Unity: 红色警报 + │ └─ OnZoneIntruded ──→ Unity: 红色警报 │ └─ All drones done - └─ OnSimulationEnded ──→ Unity: 结果面板 + 报告生成 + └─ OnSimulationEnded ──→ Unity: 结果面板 + 报告生成 ```