Commit e84672cf authored by wildfirecode's avatar wildfirecode

1

parent 4d0d43fc
...@@ -10,6 +10,7 @@ import MapRpeatPart from "./MapRpeatPart"; ...@@ -10,6 +10,7 @@ import MapRpeatPart from "./MapRpeatPart";
import MapTopPart from "./MapTopPart"; import MapTopPart from "./MapTopPart";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import wait from "../../libs/new_tc/wait"; import wait from "../../libs/new_tc/wait";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
export default class MapScene extends Scene { export default class MapScene extends Scene {
scrollGroup: eui.Group; scrollGroup: eui.Group;
...@@ -47,7 +48,12 @@ export default class MapScene extends Scene { ...@@ -47,7 +48,12 @@ export default class MapScene extends Scene {
for (const key in MapScene.iconHash) { for (const key in MapScene.iconHash) {
const element = MapScene.iconHash[key]; const element = MapScene.iconHash[key];
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
PanelCtrl.instance.show('StartPanel', key); const homeData = getHomeData();
const levelOrder = parseInt(key);
if (homeData.levels.length < levelOrder && levelOrder >1) {
showToast('必须通关前面的关卡才能开启本关');
} else
PanelCtrl.instance.show('StartPanel', key);
NetManager.ins.clickLog(getlogItem(19)) NetManager.ins.clickLog(getlogItem(19))
}, this) }, this)
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"data": { "data": {
"wealth": 13, "wealth": 13,
"totalStars": 120, "totalStars": 120,
"levels": [], "levels": [{"stars":3,"levelNum":1},{"stars":2,"levelNum":2},{"stars":1,"levelNum":3}],
"remainProp": [], "remainProp": [],
"remainEnargy": 15, "remainEnargy": 15,
"askForEnergy": false, "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