From b77c308517b0a961c0246c83d476eb2d34362d2e Mon Sep 17 00:00:00 2001
From: tian <11429339@qq.com>
Date: Fri, 12 Jun 2026 14:52:07 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85GroupManager=20+=20=E6=9E=B6?=
=?UTF-8?q?=E6=9E=84=E6=96=87=E6=A1=A3V8(=E4=BA=8B=E4=BB=B6=E9=A9=B1?=
=?UTF-8?q?=E5=8A=A8/FireSchedule/=E4=B8=89=E9=98=B6=E6=AE=B5=E6=89=A9?=
=?UTF-8?q?=E6=95=A3)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/design/architecture/总体架构设计.md | 18 ++++----
.../Assets/Scripts/Managers/GroupManager.cs | 41 +++++++++++++++++++
2 files changed, 50 insertions(+), 9 deletions(-)
create mode 100644 src/Unity/Assets/Scripts/Managers/GroupManager.cs
diff --git a/docs/design/architecture/总体架构设计.md b/docs/design/architecture/总体架构设计.md
index a643a08..4637a70 100644
--- a/docs/design/architecture/总体架构设计.md
+++ b/docs/design/architecture/总体架构设计.md
@@ -1,11 +1,11 @@
# 反无人机仿真系统 — 总体架构设计
-> **版本**:V7
-> **日期**:2026-06-11
-> **状态**:设计中
+> **版本**:V8
+> **日期**:2026-06-12
+> **状态**:已实现
> **Unity 版本**:22.3.62
> **.NET 版本**:.NET Standard 2.1
-> **变更**:明确 Core 程序集独立于 Unity;新增 IPathProvider 隔离点;新增测试策略(xUnit/确定性测试/CI 兼容)
+> **变更**:事件驱动替代 EventQueue;FireSchedule 统一发射接口;三阶段扩散模型;默认弹药 JSON 配置;Phase/Elapsed 属性
---
@@ -49,15 +49,15 @@
│ │ GroupService │ │ DefenseAdvisor│ │ ├ DroneEntity │ │
│ └──────────────┘ └──────────────┘ │ ├ PlatformEntity │ │
│ ┌──────────────┐ ┌──────────────┐ │ ├ MunitionEntity │ │
-│ │ RecordService│ │ReportService │ │ ├ CloudEntity │ │
+│ │FrameDataStore│ │ReportService │ │ ├ CloudEntity │ │
│ │ │ │ ├ ReportGen │ │ │ └ GaussianPuff│ │
-│ └──────────────┘ │ └ PDF/Word │ │ ├ ControlZone │ │
+│ └──────────────┘ │ └ Markdown │ │ ├ ControlZone │ │
│ └──────────────┘ │ ├ IDamageModel×3 │ │
-│ │ └ EventQueue │ │
+│ │ └ FireSchedule │ │
│ ┌──────────────────────────────────────────────────────┐│
│ │ Algorithm Layer (自主实现) ││
-│ │ DispersionEngine | DamageCalculator ││
-│ │ DefenseAdvisor | SpatioTemporalOptimizer ││
+│ │ GaussianPuffDispersion | DamageCalculator ││
+│ │ DefaultDefenseAdvisor | Kinematics(PG稳定度) ││
│ └──────────────────────────────────────────────────────┘│
├──────────────────────────────────────────────────────────┤
│ Data Layer │
diff --git a/src/Unity/Assets/Scripts/Managers/GroupManager.cs b/src/Unity/Assets/Scripts/Managers/GroupManager.cs
new file mode 100644
index 0000000..f9dba68
--- /dev/null
+++ b/src/Unity/Assets/Scripts/Managers/GroupManager.cs
@@ -0,0 +1,41 @@
+using System.Collections.Generic;
+using CounterDrone.Core;
+using CounterDrone.Core.Models;
+using CounterDrone.Core.Repository;
+using CounterDrone.Core.Services;
+using UnityEngine;
+
+namespace CounterDrone.Unity
+{
+ /// 编组管理桥接 — 无人机编队和装备编组的 CRUD
+ public class GroupManager : MonoBehaviour
+ {
+ private IGroupService _service;
+
+ public IGroupService Service => _service;
+
+ void Awake()
+ {
+ var paths = new UnityPathProvider();
+ var db = new DatabaseManager(paths).OpenMainDb();
+ _service = new GroupService(new GroupRepository(db));
+ }
+
+ public Group Create(string name, GroupType type, string desc = "")
+ => _service.CreateGroup(name, type, desc);
+
+ public void Delete(string id) => _service.DeleteGroup(id);
+
+ public List GetByType(GroupType? type = null) => _service.GetGroups(type);
+
+ public Group Get(string id) => _service.GetGroup(id);
+
+ [ContextMenu("Verify")]
+ void Verify()
+ {
+ Awake();
+ var g = Create("测试编队", GroupType.DroneFleet, "自动验证");
+ Debug.Log($"GroupManager OK. Created: {g.Name} ({g.Id})");
+ }
+ }
+}