@kkarum/framework 2.3.24 → 2.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ Codex / AI 工具生成本项目业务代码时必须遵守:
|
|
|
8
8
|
- `LayerController` 不查找节点或组件;节点/组件引用定义在对应 `FW.Layer` 中,节点用 `FWPropertyNode`,组件用 `FWPropertyComponent`,变量名与节点名一致。
|
|
9
9
|
- 默认不要在业务层调用 `invoke()`,除非用户明确要求。
|
|
10
10
|
- 新增业务 bundle 必须提供 `FW.Registry` 注册表,并在文件末尾调用 `FW.Framework.addRegistry()`;`bundleName` 和 `addRegistry()` 的 key 必须一致,统一使用小写 bundle 名。
|
|
11
|
+
- 不需要require对应的Registry
|
|
12
|
+
- Layer脚本不需要挂载到任何节点
|
|
11
13
|
|
|
12
14
|
Registry 示例:
|
|
13
15
|
|
|
@@ -70,9 +72,9 @@ assets/<bundle>/
|
|
|
70
72
|
script/data/<Bundle>Data.ts
|
|
71
73
|
script/logic/<Bundle>Logic.ts
|
|
72
74
|
script/<Bundle>Registry.ts
|
|
73
|
-
script/controller/<Feature>/<Feature>LayerController.ts
|
|
74
|
-
script/layer/<Feature>/<Feature>Layer.ts
|
|
75
|
-
res/layer/<Feature>Layer.prefab
|
|
75
|
+
script/controller/<Feature>/<Bundle><Feature>LayerController.ts
|
|
76
|
+
script/layer/<Feature>/<Bundle><Feature>Layer.ts
|
|
77
|
+
res/prefab/layer/<Bundle><Feature>Layer.prefab
|
|
76
78
|
```
|
|
77
79
|
|
|
78
80
|
命名必须保留框架后缀,例如 `ShopLogic`、`ShopData`、`ShopAssetConfig`、`ShopSender`、`ShopHandle`。框架会根据类名和 bundle 名自动推断依赖。
|