Commit 27ef644a authored by wildfirecode's avatar wildfirecode

1

parent 3645723e
......@@ -49,7 +49,7 @@
<img id="pic" style="width:100%;position: absolute;z-index: 999;display: none;" />
<script>
window['total_level'] = 18 + 13 * 5;
window['last_level'] = 82;//必须大于等于total_level
window['last_level'] = 72;//必须大于等于total_level
// localStorage.clear();
var sharePic = document.getElementById('pic');
......
......@@ -81,8 +81,8 @@ export default class MapScene extends Scene {
const homeData = getHomeData();
if (homeData.levels.length == 0) {
target = 1;
} else if (homeData.levels.length == 70) {
target = 70 + 1;
} else if (homeData.levels.length == window['total_level']) {
target = window['total_level'] + 1;
} else {
target = homeData.levels.length + 1;
}
......@@ -98,7 +98,7 @@ export default class MapScene extends Scene {
}, this);
}
if (homeData.levels.length < 70) {
if (homeData.levels.length < window['total_level']) {
const targetIcon = MapScene.iconHash[target];
const light = RES.getRes('lightani_png');
const pic = new egret.Bitmap(light);//76 61
......@@ -135,8 +135,8 @@ export default class MapScene extends Scene {
}, this);
let lastOrder = homeData.levels.length + 1;
if (homeData.levels.length >= 70)
lastOrder = 70;
if (homeData.levels.length >= window['total_level'])
lastOrder = window['total_level'];
this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight);
// console.warn(this.getScrollV(lastOrder, this.stage.stageHeight))
......@@ -235,7 +235,7 @@ export default class MapScene extends Scene {
this['bloodTxt'].text = `${homeData.remainEnargy}/5`;
this['goldTxt'].text = `${homeData.wealth}`;
for (let j = 1; j < 70; j++) {
for (let j = 1; j < window['total_level']; j++) {
this.disableIcon(j + 1);
}
for (let i = 0; i < homeData.levels.length; i++) {
......@@ -252,7 +252,7 @@ export default class MapScene extends Scene {
const star = MapScene.starHash[1];
star.setStar(0);
this.enableIcon(1);
} else if (homeData.levels.length == 70) {
} else if (homeData.levels.length == window['total_level']) {
} else {
const star = MapScene.starHash[homeData.levels.length + 1];
......
......@@ -34,7 +34,7 @@ export default class Prize2Panel extends Panel {
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
if (this._level + 1 <= 70)
if (this._level + 1 <= window['total_level'])
changeMapScene({ level: this._level + 1 });
else
changeMapScene();
......
......@@ -32,7 +32,7 @@ export default class SignPrizePanel extends Panel {
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
if (this._level + 1 <= 70)
if (this._level + 1 <= window['total_level'])
changeMapScene({ level: this._level + 1 });
else
changeMapScene();
......
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