Commit 8ac8b381 authored by wildfirecode's avatar wildfirecode

1

parent a099ae07
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<e:Skin class="MapRepeatPartSkin" width="750" height="1477" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="MapRepeatPartSkin" width="750" height="1477" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map2_jpg"/> <e:Image source="map2_jpg"/>
<e:Group x="351" y="26" id="icon0"> <e:Group x="351" y="26" id="icon0">
<e:Image id="nums" source="icon_png" x="0" y="0"/> <e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt0" width="76" x="12" y="18.69" text="1" font="nums_fnt" textAlign="center"/> <e:BitmapLabel id="txt0" width="76" x="12" y="18.69" text="1" font="nums_fnt" textAlign="center"/>
</e:Group> </e:Group>
<e:Group x="196" y="158" id="icon1"> <e:Group x="196" y="158" id="icon1">
......
...@@ -33,6 +33,7 @@ export default class MapBottomPart extends ComponentBase { ...@@ -33,6 +33,7 @@ export default class MapBottomPart extends ComponentBase {
icon.show = ()=>{this.addChild(icon)}; icon.show = ()=>{this.addChild(icon)};
icon['nums'] = icon.getChildAt(0); icon['nums'] = icon.getChildAt(0);
icon['bmptxt']=icon.getChildAt(1); icon['bmptxt']=icon.getChildAt(1);
icon['mappart']=this;
const star = new MapStarComp(); const star = new MapStarComp();
star.loadSkin(); star.start(); star.loadSkin(); star.start();
......
...@@ -22,6 +22,7 @@ export default class MapRpeatPart extends ComponentBase { ...@@ -22,6 +22,7 @@ export default class MapRpeatPart extends ComponentBase {
icon.show = ()=>{this.addChild(icon)}; icon.show = ()=>{this.addChild(icon)};
icon['nums'] = icon.getChildAt(0); icon['nums'] = icon.getChildAt(0);
icon['bmptxt']=icon.getChildAt(1); icon['bmptxt']=icon.getChildAt(1);
icon['mappart']=this;
const star = new MapStarComp(); const star = new MapStarComp();
star.loadSkin(); star.start(); star.loadSkin(); star.start();
......
...@@ -213,7 +213,7 @@ export default class MapScene extends Scene { ...@@ -213,7 +213,7 @@ export default class MapScene extends Scene {
const pic = new egret.Bitmap(light);//76 61 const pic = new egret.Bitmap(light);//76 61
pic.x = targetIcon.x + 50 - 2; pic.x = targetIcon.x + 50 - 2;
pic.y = targetIcon.y + 37 + 10; pic.y = targetIcon.y + 37 + 10;
targetIcon.parent.addChildAt(pic, 1); targetIcon.mappart.addChildAt(pic, 1);
// targetIcon.parent.addChildAt(pic, 0); // targetIcon.parent.addChildAt(pic, 0);
pic.anchorOffsetX = 76; pic.anchorOffsetX = 76;
pic.anchorOffsetY = 61; pic.anchorOffsetY = 61;
...@@ -408,7 +408,7 @@ export default class MapScene extends Scene { ...@@ -408,7 +408,7 @@ export default class MapScene extends Scene {
addAvatar(level, ele?) { addAvatar(level, ele?) {
const item = MapScene.iconHash[level]; const item = MapScene.iconHash[level];
const parent = item.parent; const parent = item['mappart'];
const avatar = new AvatarComp(); const avatar = new AvatarComp();
avatar.loadSkin(); avatar.loadSkin();
avatar.start(ele); avatar.start(ele);
......
...@@ -19,13 +19,13 @@ export default class MapTopPart extends ComponentBase { ...@@ -19,13 +19,13 @@ export default class MapTopPart extends ComponentBase {
icon['nums'] = icon.getChildAt(0); icon['nums'] = icon.getChildAt(0);
icon['bmptxt']=icon.getChildAt(1); icon['bmptxt']=icon.getChildAt(1);
this.removeChild(icon); this.removeChild(icon);
icon['mappart']=this;
icon.show = ()=>{this.addChild(icon)}; icon.show = ()=>{this.addChild(icon)};
console.log(icon.y)
} }
} }
getIcon(i) { return this[`icon${i}`]; } getIcon(i) { return this[`icon${i}`]; }
get skinKey(): string { return 'MapTop' } get skinKey(): string { return 'MapTop' }
} }
\ No newline at end of file
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