Commit e2a614d7 authored by wildfirecode's avatar wildfirecode

1

parent c073463f
......@@ -22,10 +22,8 @@ export default class PanelCtrl {
const key = panel.skinKey.toLowerCase();
const p = Promise.all([RES.getResAsync(`${key}_json`), RES.getResAsync(`${key}_png`)]);
p.then(() => {
RES.getResByUrl(`${key}_json`, (sheet: egret.SpriteSheet) => {
Loading.instace.hide();
this.showAfterLoadAtlas(panel, data);
}, this, RES.ResourceItem.TYPE_SHEET);
})
} else {
this.showAfterLoadAtlas(panel, data);
......
......@@ -20,17 +20,14 @@ export default class SceneCtrl {
if (!window['development']) {
Loading.instace.show();
const key = scene.skinKey.toLowerCase();
const p = Promise.all([
const promise = Promise.all([
RES.getResAsync(`${key}_json`),
RES.getResAsync(`${key}_png`),
RES.getResAsync(`${key}scenebg_jpg`)]);
p.then(() => {
// this.loadAtlasAndBg(scene, () => {
promise.then(() => {
this.showAfterLoadAtlas(scene, data, onComplete);
// })
});
} else {
this.showAfterLoadAtlas(scene, data, onComplete);
}
}
......
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