Commit b835f9d0 authored by wjf's avatar wjf

l

parents adeee341 fee68a9d
......@@ -24,7 +24,8 @@ export default class NoPrizePanel extends Panel {
onTouchTap_closeBtn() {
super.onTouchTap_closeBtn();
SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn'], this['goBtn']] }
......
......@@ -47,7 +47,8 @@ export default class PrizePanel extends Panel {
onTouchTap_closeBtn(): any {
super.onTouchTap_closeBtn();
SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
}
get picBigWidth() { return 510 };
......
......@@ -10,6 +10,7 @@ import MapRpeatPart from "./MapRpeatPart";
import MapTopPart from "./MapTopPart";
import { DataManager } from "../../libs/tw/manager/DataManager";
import wait from "../../libs/new_tc/wait";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
export default class MapScene extends Scene {
scrollGroup: eui.Group;
......@@ -47,7 +48,12 @@ export default class MapScene extends Scene {
for (const key in MapScene.iconHash) {
const element = MapScene.iconHash[key];
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
PanelCtrl.instance.show('StartPanel', key);
const homeData = getHomeData();
const levelOrder = parseInt(key);
if (levelOrder > (homeData.levels.length + 1) && levelOrder > 1) {
showToast('必须通关前面的关卡才能开启本关');
} else
PanelCtrl.instance.show('StartPanel', key);
NetManager.ins.clickLog(getlogItem(19))
}, this)
}
......
......@@ -12,8 +12,9 @@ export default class FailedPanel extends Panel {
onTouchTap_closeBtn() {
super.onTouchTap_closeBtn();
SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn'],this['againBtn']] }
get skinKey() { return 'Fail' }
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
"data": {
"wealth": 13,
"totalStars": 120,
"levels": [],
"levels": [{"stars":3,"levelNum":1}],
"remainProp": [],
"remainEnargy": 15,
"askForEnergy": false,
......
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