Commit 3d2302de authored by wildfirecode's avatar wildfirecode

1

parent 6188fd65
......@@ -134,6 +134,15 @@ export default class MapScene extends Scene {
this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight);
// console.warn(this.getScrollV(lastOrder, this.stage.stageHeight))
try {
const key = 'main2';
Promise.all([
RES.getResAsync(`${key}_json`),
RES.getResAsync(`${key}_png`)]);
} catch (error) {
}
}
destroy() {
......
......@@ -54,11 +54,22 @@ export default class StartPanel extends Panel {
console.warn(error)
}
hdGameDoDojoin((success) => {
hdGameDoDojoin(async (success) => {
Loading.instace.hide();
this.touchChildren = true;
this.touchEnabled = true;
if (success) {
Loading.instace.show();
try {
const key = 'main2';
await Promise.all([
RES.getResAsync(`${key}_json`),
RES.getResAsync(`${key}_png`)]);
} catch (error) {
}
Loading.instace.hide();
this.hidePanel();
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, { chapter: this._level });
}
......
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