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