diff --git a/My project/Assets/FlowScope/Runtime/Config/IConfigParser.cs b/My project/Assets/FlowScope/Runtime/Config/IConfigParser.cs new file mode 100644 index 0000000..b620c14 --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Config/IConfigParser.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +namespace FlowScope.Config +{ + public interface IConfigParser + { + string Format { get; } + + IReadOnlyList ParseRows( + string fileName, + string text) + where T : class, IConfigRow; + } +} diff --git a/My project/Assets/FlowScope/Runtime/Config/IConfigParser.cs.meta b/My project/Assets/FlowScope/Runtime/Config/IConfigParser.cs.meta new file mode 100644 index 0000000..90e757e --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Config/IConfigParser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d22229e25964ea29b3c6d153507b1db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/My project/Assets/FlowScope/Runtime/Config/IConfigSource.cs b/My project/Assets/FlowScope/Runtime/Config/IConfigSource.cs new file mode 100644 index 0000000..4fec809 --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Config/IConfigSource.cs @@ -0,0 +1,14 @@ +using System.Threading; +using System.Threading.Tasks; + +namespace FlowScope.Config +{ + public interface IConfigSource + { + string Name { get; } + + Task LoadTextAsync( + string fileName, + CancellationToken cancellationToken); + } +} diff --git a/My project/Assets/FlowScope/Runtime/Config/IConfigSource.cs.meta b/My project/Assets/FlowScope/Runtime/Config/IConfigSource.cs.meta new file mode 100644 index 0000000..e84d3af --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Config/IConfigSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 708db2a1c26743f3994b5d8beb1a03f8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/My project/Assets/FlowScope/Runtime/Resources/IResourceBackend.cs b/My project/Assets/FlowScope/Runtime/Resources/IResourceBackend.cs new file mode 100644 index 0000000..c66cc17 --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Resources/IResourceBackend.cs @@ -0,0 +1,18 @@ +using System.Threading; +using System.Threading.Tasks; + +namespace FlowScope.Resources +{ + public interface IResourceBackend + { + string Name { get; } + + Task LoadAsync( + string key, + CancellationToken cancellationToken) + where T : class; + + void Release(string key, T asset) + where T : class; + } +} diff --git a/My project/Assets/FlowScope/Runtime/Resources/IResourceBackend.cs.meta b/My project/Assets/FlowScope/Runtime/Resources/IResourceBackend.cs.meta new file mode 100644 index 0000000..d89acd9 --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Resources/IResourceBackend.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 76d9b18ff17949a987f26418e1f1c978 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/My project/Assets/FlowScope/Runtime/Save/ISaveMigration.cs b/My project/Assets/FlowScope/Runtime/Save/ISaveMigration.cs new file mode 100644 index 0000000..3396055 --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Save/ISaveMigration.cs @@ -0,0 +1,11 @@ +namespace FlowScope.Save +{ + public interface ISaveMigration + { + string Key { get; } + int FromVersion { get; } + int ToVersion { get; } + + string Migrate(string json); + } +} diff --git a/My project/Assets/FlowScope/Runtime/Save/ISaveMigration.cs.meta b/My project/Assets/FlowScope/Runtime/Save/ISaveMigration.cs.meta new file mode 100644 index 0000000..bc11b72 --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/Save/ISaveMigration.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 689eab5eef8647009da3f56423bd0a3d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/My project/Assets/FlowScope/Runtime/UI/IUIPreloadService.cs b/My project/Assets/FlowScope/Runtime/UI/IUIPreloadService.cs new file mode 100644 index 0000000..af4f3eb --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/UI/IUIPreloadService.cs @@ -0,0 +1,13 @@ +using System.Threading; +using System.Threading.Tasks; + +namespace FlowScope.UI +{ + public interface IUIPreloadService + { + Task PreloadAsync(CancellationToken cancellationToken); + bool IsPreloaded(); + void Release(); + void ReleaseAll(); + } +} diff --git a/My project/Assets/FlowScope/Runtime/UI/IUIPreloadService.cs.meta b/My project/Assets/FlowScope/Runtime/UI/IUIPreloadService.cs.meta new file mode 100644 index 0000000..b37529e --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/UI/IUIPreloadService.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 34f5e8174a844438842b8e839ba4bb64 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/My project/Assets/FlowScope/Runtime/UI/IUIScreenNavigator.cs b/My project/Assets/FlowScope/Runtime/UI/IUIScreenNavigator.cs new file mode 100644 index 0000000..61e06cb --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/UI/IUIScreenNavigator.cs @@ -0,0 +1,19 @@ +using System.Threading; +using System.Threading.Tasks; + +namespace FlowScope.UI +{ + public interface IUIScreenNavigator + { + Task PushAsync( + TViewModel viewModel, + CancellationToken cancellationToken) + where TPanel : UIPanelBase; + + bool CanGoBack { get; } + + void GoBack(); + + void Clear(); + } +} diff --git a/My project/Assets/FlowScope/Runtime/UI/IUIScreenNavigator.cs.meta b/My project/Assets/FlowScope/Runtime/UI/IUIScreenNavigator.cs.meta new file mode 100644 index 0000000..41a739b --- /dev/null +++ b/My project/Assets/FlowScope/Runtime/UI/IUIScreenNavigator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d76da54cf887479d8448849a5ddb7dd8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/docs/requirements/p0-requirements-set.md b/docs/requirements/p0-requirements-set.md index 9f616a5..3d4479b 100644 --- a/docs/requirements/p0-requirements-set.md +++ b/docs/requirements/p0-requirements-set.md @@ -655,6 +655,8 @@ MainMenuFeature 后续能力优先做成可插拔扩展,而不是污染 P0 核心: +P1 生产化承接边界:P1 可以新增小接口、适配层和样例验收能力,但不得重写 P0 的核心生命周期、容器、UI 层内 LIFO、JSON 默认配置、本地存档和资源所有权语义。任何涉及 Addressables、配置来源、存档迁移、UI 导航或预加载的能力,都应先通过 P1 契约进入,再由独立实现或适配程序集承接。 + | 能力 | 建议阶段 | 形式 | |------|----------|------| | CSV / Luban 配置 | P1/P2 | `IConfigParser` 插件 | diff --git a/docs/requirements/p1-production-hardening.md b/docs/requirements/p1-production-hardening.md new file mode 100644 index 0000000..20638af --- /dev/null +++ b/docs/requirements/p1-production-hardening.md @@ -0,0 +1,22 @@ +# FlowScope Game Core P1 生产化需求 + +## 目标 + +P1 在 P0 核心接口稳定后推进,目标是补齐第一批生产化扩展点,而不是扩张成完整框架生态。 + +## 本轮范围 + +- `IResourceBackend` 与 Addressables 独立适配。 +- `IConfigSource` / `IConfigParser` 配置扩展点。 +- `ISaveMigration` 存档迁移扩展点。 +- `IUIScreenNavigator` 与 Panel 预加载。 +- MainMenuP0 样例验收升级。 +- 使用规范文档。 + +## 不进入本轮 + +- Luban 完整接入。 +- YooAsset / AssetBundle 后端实现。 +- 云存档。 +- AudioMixer / 3D 音频。 +- Package 分发。