Commit 6f77da5d authored by wildfirecode's avatar wildfirecode

1

parent fb53ec69
......@@ -234,8 +234,7 @@ export default class MainBase extends eui.UILayer {
// tslint:disable-next-line: cyclomatic-complexity
private async runGame() {
await this.loadResource();
RES.getResAsync('redrainbg_jpg');
RES.getResAsync('hbRule_bg_png');
RES.getResAsync('mapBg_mp3');
RES.getResAsync('sharefriend_jpg');
RES.getResAsync(`nums_png`);
......@@ -246,23 +245,11 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync(`nums3_png`);
RES.getResAsync(`nums3_fnt`);
RES.getResAsync(`candynums_fnt`);
RES.getResAsync('candydis0_json');
RES.getResAsync('candydis1_json');
RES.getResAsync('candydis2_json');
RES.getResAsync('candydis3_json');
RES.getResAsync('candydis4_json');
RES.getResAsync('candydie0_json');
RES.getResAsync('candydie1_json');
RES.getResAsync('candydie2_json');
RES.getResAsync('candydie3_json');
RES.getResAsync('candydie4_json');
RES.getResAsync('candysub_json');
RES.getResAsync('candydiebg_json');
if (!window['development']) {
RES.getResAsync(`common_json`);
RES.getResAsync(`share3_json`);
RES.getResAsync(`friendshare_json`);
RES.getResAsync(`inviterulepanel_json`);
}
else {
RES.getResAsync('common_block_bg_yellow_png');
......@@ -449,12 +436,7 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync('loading_jpg', (t) => { r(t) }, this)
})
]);
loadSvga(getResPath() + 'resource/assets/svgas/box.svga');
loadSvga(getResPath() + 'resource/assets/svgas/invite.svga');
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga');
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga');
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga');
loadSvga(getResPath() + 'resource/assets/svgas/monster.svga');
}
catch (e) {
console.error(e);
......
This diff is collapsed.
......@@ -342,15 +342,42 @@ export default class MapScene extends Scene {
lastOrder = window['total_level'];
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) {
}
setTimeout(() => {
try {
const key = 'main2';
Promise.all([
RES.getResAsync(`${key}_json`),
RES.getResAsync(`${key}_png`)]);
} catch (error) { }
RES.getResAsync('candydis0_json');
RES.getResAsync('candydis1_json');
RES.getResAsync('candydis2_json');
RES.getResAsync('candydis3_json');
RES.getResAsync('candydis4_json');
RES.getResAsync('candydie0_json');
RES.getResAsync('candydie1_json');
RES.getResAsync('candydie2_json');
RES.getResAsync('candydie3_json');
RES.getResAsync('candydie4_json');
RES.getResAsync('candysub_json');
RES.getResAsync('candydiebg_json');
RES.getResAsync('redrainbg_jpg');
RES.getResAsync('hbRule_bg_png');
loadSvga(getResPath() + 'resource/assets/svgas/box.svga');
loadSvga(getResPath() + 'resource/assets/svgas/invite.svga');
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga');
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga');
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga');
loadSvga(getResPath() + 'resource/assets/svgas/monster.svga');
if (!window['development']) {
RES.getResAsync(`inviterulepanel_json`);
}
}, 10*1000);
this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
}
......
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