Commit f40a872d authored by Master Q's avatar Master Q

onPreloadAllGroup resource

parent f95898a6
......@@ -147,6 +147,16 @@ export class Main {
// destroyWebNetData()
}
public static async onPreloadResource() {
return new Promise<void>(async (r) => {
RES.loadConfig(ResJson);
// 皮肤配置加载
RES.loadSkinConfig(SkinJson);
await RES.loadAllGroup()
r()
})
}
private async onAddToStage() {
//初始化层级
layers.init(this.stage);
......@@ -159,6 +169,7 @@ export class Main {
console.log("初始化皮肤配置完成")
// 加载通用资源
await RES.loadGroup("common");
RES.loadAllGroup()
console.log("通用资源加载完成")
// h5环境时,隐藏加载中
if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment