Commit 421ed1d2 authored by wildfirecode's avatar wildfirecode

1

parent 57f9a61e
......@@ -2,5 +2,5 @@
<e:Skin class="ShareSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect width="750" height="1624" fillAlpha="0.7"/>
<e:Image source="share2_jpg"/>
<e:Label id="lvTxt" text="2" x="336.65" y="918.94" size="20" anchorOffsetX="0" width="42.33" textAlign="center" verticalAlign="middle" textColor="0xea2917"/>
<e:Label id="lvTxt" text="11" x="336.65" y="920.94" size="20" anchorOffsetX="0" width="42.33" textAlign="center" textColor="0xea2917"/>
</e:Skin>
\ No newline at end of file
......@@ -12,7 +12,6 @@ import { playBg, toggleBg, toggleSound } from "../soundCtrl";
import MapBottomPart from "./MapBottomPart";
import MapRpeatPart from "./MapRpeatPart";
import MapTopPart from "./MapTopPart";
import getShowOffPic from "../getShowOffPic";
export default class MapScene extends Scene {
scrollGroup: eui.Group;
......@@ -55,11 +54,11 @@ export default class MapScene extends Scene {
let target;
const homeData = getHomeData();
if(homeData.levels.length == 0) {
if (homeData.levels.length == 0) {
target = 1;
}else if(homeData.levels.length ==70) {
target = 70+1;
}else {
} else if (homeData.levels.length == 70) {
target = 70 + 1;
} else {
target = homeData.levels.length + 1;
}
for (const key in MapScene.iconHash) {
......@@ -71,30 +70,34 @@ export default class MapScene extends Scene {
} else
PanelCtrl.instance.show('StartPanel', key);
NetManager.ins.clickLog(getlogItem(19))
}, this);
}, this);
}
if(homeData.levels.length <70) {
if (homeData.levels.length < 70) {
const targetIcon = MapScene.iconHash[target];
const light = RES.getRes('lightani_png');
const pic = new egret.Bitmap(light);//76 61
// targetIcon.addChild(pic);
targetIcon.addChildAt(pic,0);
pic.anchorOffsetX=76;
pic.anchorOffsetY=61;
pic.x =50-2;
pic.y =37+10;
egret.Tween.get(pic,{loop:true}).to({scaleX:2,scaleY:2,alpha:0},1000).wait(1000);
targetIcon.addChildAt(pic, 0);
pic.anchorOffsetX = 76;
pic.anchorOffsetY = 61;
pic.x = 50 - 2;
pic.y = 37 + 10;
egret.Tween.get(pic, { loop: true }).to({ scaleX: 2, scaleY: 2, alpha: 0 }, 1000).wait(1000);
this['pic'] = pic;
}
this.updateHomeData();
this.showLog();
this.updateBox();
if (data.level) {
PanelCtrl.instance.show('StartPanel', data.level)
if (homeData.remainEnargy == 0)
PanelCtrl.instance.show('bloodPanel')
else
PanelCtrl.instance.show('StartPanel', data.level)
}
this.stage.once(egret.TouchEvent.TOUCH_TAP, () => {
......@@ -109,14 +112,14 @@ export default class MapScene extends Scene {
lastOrder = 70;
this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight);
// console.warn(this.getScrollV(lastOrder, this.stage.stageHeight))
}
destroy(){
destroy() {
super.destroy();
if(this['pic'])
egret.Tween.removeTweens(this['pic']);
if (this['pic'])
egret.Tween.removeTweens(this['pic']);
}
getScrollV(lastOrder, stageHeight) {
......@@ -206,15 +209,15 @@ export default class MapScene extends Scene {
this.disableIcon(level.levelNum);
}
}
if(homeData.levels.length==0) {
if (homeData.levels.length == 0) {
const star = MapScene.starHash[1];
star.setStar(0);
this.enableIcon(1);
}else if(homeData.levels.length==70) {
}else {
const star = MapScene.starHash[homeData.levels.length+1];
this.enableIcon(homeData.levels.length+1);
} else if (homeData.levels.length == 70) {
} else {
const star = MapScene.starHash[homeData.levels.length + 1];
this.enableIcon(homeData.levels.length + 1);
}
}
......
......@@ -22,7 +22,7 @@
"num": 0
}
],
"remainEnargy": 9979,
"remainEnargy": 0,
"askForEnergy": false,
"canReceiveTreasureBoxNum": 0,
"nextRangeStarsNum": 150
......
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