@shimotsuki/core 1.0.8 → 1.0.10
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/dist/index.d.ts +4 -4
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -988,7 +988,7 @@ declare class GuiManager extends BaseManager {
|
|
|
988
988
|
*/
|
|
989
989
|
private getGuiPrefabByType;
|
|
990
990
|
/**初始化 */
|
|
991
|
-
init(
|
|
991
|
+
init(bundleName?: string, path?: string): Promise<this>;
|
|
992
992
|
}
|
|
993
993
|
|
|
994
994
|
/**
|
|
@@ -1013,9 +1013,9 @@ declare class Manager {
|
|
|
1013
1013
|
/**工具类 */
|
|
1014
1014
|
util: CoreUtil;
|
|
1015
1015
|
/**GUI资源配置 */
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1016
|
+
setConfig: ({ gui_path, gui_bundleName }?: {
|
|
1017
|
+
gui_path?: string;
|
|
1018
|
+
gui_bundleName?: string;
|
|
1019
1019
|
}) => this;
|
|
1020
1020
|
/**启动 */
|
|
1021
1021
|
boot(): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -1719,7 +1719,7 @@ var BasePrefab;
|
|
|
1719
1719
|
class GuiManager extends BaseManager {
|
|
1720
1720
|
/**常驻顶层UI节点层级 */
|
|
1721
1721
|
gui;
|
|
1722
|
-
#path = '
|
|
1722
|
+
#path = 'prefabs';
|
|
1723
1723
|
#bundleName = 'resources';
|
|
1724
1724
|
/**
|
|
1725
1725
|
* 获取预制体
|
|
@@ -1739,7 +1739,7 @@ class GuiManager extends BaseManager {
|
|
|
1739
1739
|
});
|
|
1740
1740
|
};
|
|
1741
1741
|
/**初始化 */
|
|
1742
|
-
async init(
|
|
1742
|
+
async init(bundleName = 'resources', path = 'prefabs') {
|
|
1743
1743
|
this.#bundleName = bundleName;
|
|
1744
1744
|
this.#path = path;
|
|
1745
1745
|
// 初始化常驻节点
|
|
@@ -2547,13 +2547,13 @@ class Manager {
|
|
|
2547
2547
|
res;
|
|
2548
2548
|
/**工具类 */
|
|
2549
2549
|
util;
|
|
2550
|
-
#
|
|
2551
|
-
#
|
|
2550
|
+
#gui_path = 'core';
|
|
2551
|
+
#gui_bundleName = 'resources';
|
|
2552
2552
|
/**GUI资源配置 */
|
|
2553
|
-
|
|
2554
|
-
this.#
|
|
2555
|
-
this.#
|
|
2556
|
-
console.log('GUI资源配置', this.#
|
|
2553
|
+
setConfig = ({ gui_path = 'core', gui_bundleName = 'resources' } = {}) => {
|
|
2554
|
+
this.#gui_path = gui_path;
|
|
2555
|
+
this.#gui_bundleName = gui_bundleName;
|
|
2556
|
+
console.log('GUI资源配置', this.#gui_path, this.#gui_bundleName);
|
|
2557
2557
|
return this;
|
|
2558
2558
|
};
|
|
2559
2559
|
/**启动 */
|
|
@@ -2563,7 +2563,7 @@ class Manager {
|
|
|
2563
2563
|
this.storage = new StorageManager(this);
|
|
2564
2564
|
this.event = new MessageManager();
|
|
2565
2565
|
this.audio = new AudioManager(this);
|
|
2566
|
-
this.gui = (await (new GuiManager(this)).init(this.#
|
|
2566
|
+
this.gui = (await (new GuiManager(this)).init(this.#gui_bundleName, this.#gui_path)).gui;
|
|
2567
2567
|
}
|
|
2568
2568
|
}
|
|
2569
2569
|
const cat = Manager.instance;
|