Commit 4368020e authored by wildfirecode's avatar wildfirecode

1

parent 123fdc42
......@@ -19,7 +19,7 @@
background-color: #000;
background-size: 100%;
background-position: top;
background-image: url("https://yun.duiba.com.cn/db_games/activity/game/1573121232/resource/assets/startScene/startscenebg.jpg");
background-image: url("https://yun.duiba.com.cn/db_games/activity/game/1577351394/resource/assets/startScene/startscenebg.jpg");
padding: 0;
border: 0;
margin: 0;
......
......@@ -12,7 +12,7 @@
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Label id="propnums2" text="30" textColor="0x885037" bold="true" y="564.95" width="75" textAlign="right" x="287.16" visible="false"/>
<e:Button id="closeBtn" label="" x="604.96" y="250.18">
<e:Button id="closeBtn" label="" x="588.96" y="264.18">
<e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......
......@@ -281,6 +281,7 @@ export default class MainScene extends Scene {
this.initLattices();
//初始化回收口,如果是棒棒糖关卡,那么在地图底部增加棒棒糖洞,用到map
this.initRecycle();
this.initConnectedLats();
//初始化元素
this.initElement();
//重置基础元素类型及特效
......@@ -481,6 +482,32 @@ export default class MainScene extends Scene {
}
}
initConnectedLats(){
if(!this.chapterData.map.connectedLats) return;
for (let index = 0; index < this.chapterData.map.connectedLats.length; index++) {
const [p1,p2] = this.chapterData.map.connectedLats[index];
console.log(index,p1,p2);
var p = Tool.getPositionByIndex(p1);
const texture: egret.Texture = RES.getRes('main_mapbottom_png');
const img = new eui.Image(texture);
img.anchorOffsetX=texture.textureWidth/2;
img.anchorOffsetY=texture.textureHeight/2;
img.x = p[0];
img.y = p[1]+40 + texture.textureHeight/2;
this.map.addChild(img);
var pp = Tool.getPositionByIndex(p2);
const texture2: egret.Texture = RES.getRes('main_mapbottom_png');
const img2 = new eui.Image(texture2);
img2.anchorOffsetX=texture2.textureWidth/2;
img2.anchorOffsetY=texture2.textureHeight/2;
img2.x = pp[0];
img2.y = pp[1] - 40 - texture2.textureHeight/2;
this.map.addChild(img2);
}
}
initRecycle() {
//以防万一,初始化下。不排除,目标元素不是棒棒糖的,但是元素里有棒棒糖的情况;
this.recycleIndexs = [];
......
This diff is collapsed.
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