mirror of
https://gitee.com/dgflash/oops-framework.git
synced 2026-06-03 19:09:36 +08:00
.
This commit is contained in:
@@ -2,10 +2,9 @@
|
||||
* @Author: dgflash
|
||||
* @Date: 2022-07-22 17:06:22
|
||||
* @LastEditors: dgflash
|
||||
* @LastEditTime: 2022-08-05 10:16:40
|
||||
* @LastEditTime: 2022-09-22 14:41:58
|
||||
*/
|
||||
|
||||
import { resLoader } from "../../../../../extensions/oops-plugin-framework/assets/core/common/loader/ResLoader";
|
||||
import { oops } from "../../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { AsyncQueue, NextFunction } from "../../../../../extensions/oops-plugin-framework/assets/libs/collection/AsyncQueue";
|
||||
import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
@@ -44,7 +43,7 @@ export class InitResSystem extends ecs.ComblockSystem implements ecs.IEntityEnte
|
||||
private loadCustom(queue: AsyncQueue) {
|
||||
queue.push(async (next: NextFunction, params: any, args: any) => {
|
||||
// 加载多语言对应字体
|
||||
resLoader.load("language/font/" + oops.language.current, next);
|
||||
oops.res.load("language/font/" + oops.language.current, next);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -69,7 +68,7 @@ export class InitResSystem extends ecs.ComblockSystem implements ecs.IEntityEnte
|
||||
/** 加载公共资源(必备) */
|
||||
private loadCommon(queue: AsyncQueue) {
|
||||
queue.push((next: NextFunction, params: any, args: any) => {
|
||||
resLoader.loadDir("common", next);
|
||||
oops.res.loadDir("common", next);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,7 +76,7 @@ export class InitResSystem extends ecs.ComblockSystem implements ecs.IEntityEnte
|
||||
private onComplete(queue: AsyncQueue, e: Initialize) {
|
||||
queue.complete = async () => {
|
||||
var node = await oops.gui.openAsync(UIID.Loading);
|
||||
if (node) e.add(node.getComponent(LoadingViewComp) as ecs.Comp);
|
||||
if (node) e.add(node.getComponent(LoadingViewComp) as ecs.Comp);
|
||||
e.remove(InitResComp);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user