Commit 351dd6cb authored by wildfirecode's avatar wildfirecode

1

parent 5b1737e8
......@@ -13,13 +13,15 @@ export default class PanelCtrl {
this._parent = parent;
}
private noLoadingList = ['StartPanel','failed','prize2', ModuleTypes.PRIZE_PANEL,ModuleTypes.NO_PRIZE_PANEL];
show(type: any, data?) {
this.closeCurrent(true);
const cls = this._panelClassMap[type];
const panel: Panel = new cls(data);
this.addMask();
if (!window['development']) {
Loading.instace.show();
if(this.noLoadingList.indexOf(type) == -1)
Loading.instace.show();
const key = panel.skinKey.toLowerCase();
const reskey = panel.skinResKey || key;
const p = Promise.all([RES.getResAsync(`${reskey}_json`), RES.getResAsync(`${reskey}_png`)]);
......
......@@ -8,7 +8,6 @@ import { PassType } from "../something/enum/PassType";
import { getPropNums } from "../getHomeData";
import PropType from "../PropType";
import hdGameDoDojoin from "../../libs/new_tw/ctrls/hdGameDoDojoin";
import Loading from "../../libs/new_wx/components/Loading";
import TargetItemRenderer from "./TargetItemRenderer";
export default class StartPanel extends Panel {
......@@ -19,7 +18,7 @@ export default class StartPanel extends Panel {
setGlow(this['levelTxt'], 0xfa4b09, 1);
this['levelTxt'].text = `第${data}关`;
this._level = data;
var mapDataIndex = data;
let mapDataIndex = data;
if (data >= 56) {
//循环36到50
mapDataIndex = data - 20
......@@ -58,7 +57,7 @@ export default class StartPanel extends Panel {
}
onTap_startBtn() {
Loading.instace.show();
// Loading.instace.show();
this.touchChildren = false;
this.touchEnabled = false;
try {
......@@ -68,11 +67,11 @@ export default class StartPanel extends Panel {
}
hdGameDoDojoin(async (success) => {
Loading.instace.hide();
// Loading.instace.hide();
this.touchChildren = true;
this.touchEnabled = true;
if (success) {
Loading.instace.show();
// Loading.instace.show();
try {
const key = 'main2';
await Promise.all([
......@@ -82,7 +81,7 @@ export default class StartPanel extends Panel {
}
Loading.instace.hide();
// 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