Commit e84672cf authored by wildfirecode's avatar wildfirecode

1

parent 4d0d43fc
......@@ -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,6 +48,11 @@ export default class MapScene extends Scene {
for (const key in MapScene.iconHash) {
const element = MapScene.iconHash[key];
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
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))
}, this)
......
......@@ -6,7 +6,7 @@
"data": {
"wealth": 13,
"totalStars": 120,
"levels": [],
"levels": [{"stars":3,"levelNum":1},{"stars":2,"levelNum":2},{"stars":1,"levelNum":3}],
"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