Commit 27ef644a authored by wildfirecode's avatar wildfirecode

1

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