修复tostring导致的循环maxinum call

This commit is contained in:
YHH
2020-07-26 23:27:42 +08:00
parent 2b13e5ee7d
commit 149a3e5833
12 changed files with 48 additions and 18 deletions

View File

@@ -34,23 +34,22 @@ class Main extends es.Core {
private runGame() {
this.loadResource();
this.createGameScene();
}
private loadResource() {
try {
const loadingView = new LoadingUI();
this.stage.addChild(loadingView);
RES.loadConfig("resource/default.res.json", "resource/").then(()=>{
RES.loadGroup("preload", 0, loadingView).then(()=>{
this.stage.removeChild(loadingView);
});
const loadingView = new LoadingUI();
this.stage.addChild(loadingView);
RES.loadConfig("resource/default.res.json", "resource/").then(()=>{
RES.loadGroup("preload", 0, loadingView).then(()=>{
this.stage.removeChild(loadingView);
this.createGameScene();
}).catch(err => {
console.error(err);
});
}
catch (e) {
console.error(e);
}
}).catch(err =>{
console.error(err);
});
}
/**