Commit fee68a9d authored by wildfirecode's avatar wildfirecode

1

parent b1e98e06
......@@ -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 };
......
......@@ -50,7 +50,7 @@ export default class MapScene extends Scene {
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
const homeData = getHomeData();
const levelOrder = parseInt(key);
if (homeData.levels.length < levelOrder && levelOrder >1) {
if (levelOrder > (homeData.levels.length + 1) && levelOrder > 1) {
showToast('必须通关前面的关卡才能开启本关');
} else
PanelCtrl.instance.show('StartPanel', key);
......
......@@ -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": [{"stars":3,"levelNum":1},{"stars":2,"levelNum":2},{"stars":1,"levelNum":3}],
"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