Commit e01b96f5 authored by 邱旭's avatar 邱旭

1

parent 52b616e4
......@@ -65,7 +65,7 @@
// localStorage.clear();
window['testUrl'] = 'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521';
window['hbRainTime'] = 30; // 红包雨倒计时
window['plugs'] = [1, 2, 3]
window['plugs'] = [1, 2, 3];
// localStorage.clear();
window['isInvitePage'] = 0;
var targetUrl = 'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404';
......@@ -137,9 +137,9 @@
];
// localStorage.clear();
window['imgver'] = '11112';
//top 7 ,repeat 13 , bottom 12
window['total_level'] = 19 + 13 * 32;
window['last_level'] = 425;
//top 8 ,repeat 22 , bottom 3
window['total_level'] = 8 + 3 + 22 * 20;
window['last_level'] = 451;
var sharePic = document.getElementById('pic');
......
{"file":"nums.png","frames":{
"9":{"x":74,"y":27,"w":22,"h":25,"offX":0,"offY":0,"sourceW":22,"sourceH":25},
"8":{"x":76,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"7":{"x":0,"y":27,"w":23,"h":24,"offX":0,"offY":0,"sourceW":23,"sourceH":24},
"6":{"x":26,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"5":{"x":25,"y":27,"w":23,"h":24,"offX":0,"offY":0,"sourceW":23,"sourceH":24},
"4":{"x":0,"y":0,"w":24,"h":25,"offX":0,"offY":0,"sourceW":24,"sourceH":25},
"3":{"x":101,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"2":{"x":51,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"1":{"x":98,"y":27,"w":16,"h":25,"offX":0,"offY":0,"sourceW":16,"sourceH":25},
"0":{"x":50,"y":27,"w":22,"h":25,"offX":0,"offY":0,"sourceW":22,"sourceH":25}}}
\ No newline at end of file
"1":{"x":90,"y":0,"w":13,"h":28,"offX":0,"offY":0,"sourceW":13,"sourceH":28},
"9":{"x":46,"y":0,"w":20,"h":28,"offX":0,"offY":0,"sourceW":20,"sourceH":28},
"8":{"x":68,"y":0,"w":20,"h":28,"offX":0,"offY":0,"sourceW":20,"sourceH":28},
"7":{"x":23,"y":0,"w":21,"h":28,"offX":0,"offY":0,"sourceW":21,"sourceH":28},
"6":{"x":45,"y":30,"w":20,"h":28,"offX":0,"offY":0,"sourceW":20,"sourceH":28},
"5":{"x":23,"y":30,"w":20,"h":28,"offX":0,"offY":0,"sourceW":20,"sourceH":28},
"3":{"x":67,"y":30,"w":20,"h":28,"offX":0,"offY":0,"sourceW":20,"sourceH":28},
"0":{"x":0,"y":0,"w":21,"h":28,"offX":0,"offY":0,"sourceW":21,"sourceH":28},
"4":{"x":0,"y":30,"w":21,"h":28,"offX":0,"offY":0,"sourceW":21,"sourceH":28},
"2":{"x":89,"y":30,"w":19,"h":28,"offX":0,"offY":0,"sourceW":19,"sourceH":28}}}
\ No newline at end of file
egret/resource/assets/common/nums.png

2.98 KB | W: | H:

egret/resource/assets/common/nums.png

5.12 KB | W: | H:

egret/resource/assets/common/nums.png
egret/resource/assets/common/nums.png
egret/resource/assets/common/nums.png
egret/resource/assets/common/nums.png
  • 2-up
  • Swipe
  • Onion skin
{"file":"nums3.png","frames":{
"9":{"x":74,"y":27,"w":22,"h":25,"offX":0,"offY":0,"sourceW":22,"sourceH":25},
"8":{"x":76,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"7":{"x":0,"y":27,"w":23,"h":24,"offX":0,"offY":0,"sourceW":23,"sourceH":24},
"6":{"x":26,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"5":{"x":25,"y":27,"w":23,"h":24,"offX":0,"offY":0,"sourceW":23,"sourceH":24},
"4":{"x":0,"y":0,"w":24,"h":25,"offX":0,"offY":0,"sourceW":24,"sourceH":25},
"3":{"x":101,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"2":{"x":51,"y":0,"w":23,"h":25,"offX":0,"offY":0,"sourceW":23,"sourceH":25},
"1":{"x":98,"y":27,"w":16,"h":25,"offX":0,"offY":0,"sourceW":16,"sourceH":25},
"0":{"x":50,"y":27,"w":22,"h":25,"offX":0,"offY":0,"sourceW":22,"sourceH":25}}}
\ No newline at end of file
"7":{"x":23,"y":0,"w":19,"h":26,"offX":0,"offY":1,"sourceW":19,"sourceH":28},
"9":{"x":0,"y":56,"w":19,"h":26,"offX":0,"offY":1,"sourceW":19,"sourceH":28},
"8":{"x":0,"y":84,"w":19,"h":26,"offX":0,"offY":1,"sourceW":19,"sourceH":28},
"6":{"x":21,"y":28,"w":19,"h":26,"offX":0,"offY":1,"sourceW":19,"sourceH":28},
"4":{"x":0,"y":0,"w":21,"h":26,"offX":0,"offY":1,"sourceW":21,"sourceH":28},
"5":{"x":44,"y":0,"w":18,"h":26,"offX":0,"offY":1,"sourceW":18,"sourceH":28},
"3":{"x":21,"y":56,"w":19,"h":26,"offX":0,"offY":1,"sourceW":19,"sourceH":28},
"1":{"x":42,"y":56,"w":12,"h":26,"offX":0,"offY":1,"sourceW":12,"sourceH":28},
"2":{"x":42,"y":28,"w":19,"h":26,"offX":0,"offY":1,"sourceW":19,"sourceH":28},
"0":{"x":0,"y":28,"w":19,"h":26,"offX":0,"offY":1,"sourceW":19,"sourceH":28}}}
\ No newline at end of file
egret/resource/assets/common/nums3.png

4.93 KB | W: | H:

egret/resource/assets/common/nums3.png

4.82 KB | W: | H:

egret/resource/assets/common/nums3.png
egret/resource/assets/common/nums3.png
egret/resource/assets/common/nums3.png
egret/resource/assets/common/nums3.png
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/icon.png

9.52 KB | W: | H:

egret/resource/assets/map/icon.png

10 KB | W: | H:

egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map1.jpg

173 KB | W: | H:

egret/resource/assets/map/map1.jpg

484 KB | W: | H:

egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map2.jpg

202 KB | W: | H:

egret/resource/assets/map/map2.jpg

935 KB | W: | H:

egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map3.jpg

186 KB | W: | H:

egret/resource/assets/map/map3.jpg

249 KB | W: | H:

egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/无星星.png

2.47 KB | W: | H:

egret/resource/assets/map/无星星.png

3.18 KB | W: | H:

egret/resource/assets/map/无星星.png
egret/resource/assets/map/无星星.png
egret/resource/assets/map/无星星.png
egret/resource/assets/map/无星星.png
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/有星星.png

2.15 KB | W: | H:

egret/resource/assets/map/有星星.png

3.98 KB | W: | H:

egret/resource/assets/map/有星星.png
egret/resource/assets/map/有星星.png
egret/resource/assets/map/有星星.png
egret/resource/assets/map/有星星.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -21,7 +21,7 @@
"name": "buy3"
},
{
"keys": "宝箱_png,宝箱1_png,宝箱2_png,宝箱3_png,宝箱bg_png,宝箱btn_png,道具_png,关闭 拷贝_png,光 副本 4_png,设置_png,设置bg_png,声音_png,声音关闭_png,狮子_png,退出_png,问题_png,无星星_png,星星_png,星星bg_png,音乐_png,音乐关闭_png,有星星_png,有星星2_png,有星星3_png,元宝bg_png,ad_icon_png,animal1_png,avatar_png,friend_avatar_png,guideBox_png,guideLevel_png,guideLove_png,guideMoney_png,guideOver_png,icon_png,iconbg_png,icongray_png,invite_icon_png,invite_txtbg_png,lionMsgBg_png,map_signicon_png,map1_jpg,map2_jpg,map2+_png,map2+bg_png,map2红包大作战_png,map2热门引导_png,map2周一红包雨_png,map3_jpg,map大转盘_png,map刮现金红包_png,map今日可领_png,map明日可领_png,maphot_png,msgTri_png,namebg_png,progress1_png,progress2_png,recordbtn_png,taskicon_png,map2+bg2_png,mapredbagicom_png,maplight2_png,taskBtn_png,txtbg_blue_png,txtbg_orange_png,txtbg_purple_png,mapredbagicom2_png",
"keys": "宝箱_png,宝箱1_png,宝箱2_png,宝箱3_png,宝箱bg_png,宝箱btn_png,道具_png,关闭 拷贝_png,光 副本 4_png,设置_png,设置bg_png,声音_png,声音关闭_png,狮子_png,退出_png,问题_png,无星星_png,星星_png,星星bg_png,音乐_png,音乐关闭_png,有星星_png,有星星2_png,有星星3_png,元宝bg_png,ad_icon_png,animal1_png,avatar_png,friend_avatar_png,guideBox_png,guideLevel_png,guideLove_png,guideMoney_png,guideOver_png,icon_png,iconbg_png,icongray_png,invite_icon_png,invite_txtbg_png,lionMsgBg_png,map_signicon_png,map1_jpg,map2_jpg,map2+_png,map2+bg_png,map2红包大作战_png,map2热门引导_png,map2周一红包雨_png,map3_jpg,map大转盘_png,map刮现金红包_png,map今日可领_png,map明日可领_png,maphot_png,msgTri_png,namebg_png,progress1_png,progress2_png,recordbtn_png,taskicon_png,map2+bg2_png,mapredbagicom_png,maplight2_png,taskBtn_png,txtbg_blue_png,txtbg_orange_png,txtbg_purple_png,mapredbagicom2_png,iconnow_png",
"name": "map"
},
{
......@@ -4483,6 +4483,11 @@
"url": "assets/mainScene/ele33_1.png",
"type": "image",
"name": "ele33_1_png"
},
{
"url": "assets/map/iconnow.png",
"type": "image",
"name": "iconnow_png"
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="AvatarSkin" width="79" height="85" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="friend_avatar_png"/>
<e:Group x="8.5" y="8.8">
<e:Image id="avatar" y="0" source="" width="64" height="64" x="0"/>
<e:Rect id="avatarMask" width="64" height="64" y="0" ellipseWidth="64" ellipseHeight="64"/>
<e:Skin class="AvatarSkin" width="95" height="104" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="friend_avatar_png" anchorOffsetX="0" anchorOffsetY="0"/>
<e:Group x="8.5" y="8.8" width="77" height="77">
<e:Image id="avatar" y="0" source="" width="77" height="77" x="0" anchorOffsetX="0" anchorOffsetY="0"/>
<e:Rect id="avatarMask" width="77" height="77" y="0" ellipseWidth="999" ellipseHeight="999" anchorOffsetY="0" x="1"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapBottomSkin" width="750" height="1530" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapBottomSkin" width="750" height="528" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map3_jpg" x="0" y="0"/>
<e:Group x="389" y="44" id="icon0">
<e:Group x="505.97" y="62" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt0" width="76" x="12" y="18.69" text="60" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="541.97" y="148.44">
<e:Group id="icon1" x="553.97" y="176">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt1" width="76" x="12" y="18.69" text="61" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="524" y="331" id="icon2">
<e:Group x="556" y="314" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt2" width="76" x="12" y="18.69" text="62" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="329.94" y="403" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt3" width="76" x="12" y="18.69" text="63" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="83" y="513" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt4" width="76" x="12" y="18.69" text="64" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="304" y="660" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt5" width="76" x="12" y="18.69" text="65" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="829.69" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt6" width="76" x="12" y="18.69" text="66" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="149.01" y="949.69" id="icon7">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt7" width="76" x="12" y="18.69" text="67" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="317.01" y="1052.69" id="icon8">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt8" width="76" x="12" y="18.69" text="68" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="507.01" y="1148.69" id="icon9">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt9" width="76" x="12" y="18.69" text="69" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377.01" y="1209.69" id="icon10">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt10" width="76" x="12" y="18.69" text="70" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="252.01" y="1282.69" id="icon11">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt11" width="76" x="12" y="18.69" text="71" font="nums_fnt" textAlign="center"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<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="2297" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map2_jpg"/>
<e:Group x="351" y="26" id="icon0">
<e:Group x="249" y="4" id="icon0">
<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" textAlign="center" font="nums_fnt"/>
</e:Group>
<e:Group x="196" y="158" id="icon1">
<e:Group x="405" y="55" id="icon1">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt1" width="76" x="12" y="18.69" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="143" y="302" id="icon2">
<e:Group x="520" y="160" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt2" width="76" x="12" y="18.69" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="235" y="435" id="icon3">
<e:Group x="532" y="315" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt3" width="76" x="12" y="18.69" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="348" y="547" id="icon4">
<e:Group x="444" y="431" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt4" width="76" x="12" y="18.69" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="499" y="674" id="icon5">
<e:Group x="294" y="529" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt5" width="76" x="12" y="18.69" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="390" y="821" id="icon6">
<e:Group x="136" y="594" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt6" width="76" x="12" y="18.69" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="218" y="897" id="icon7">
<e:Group x="93" y="714" id="icon7">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt7" width="76" x="12" y="18.69" text="8" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="28" y="969" id="icon8">
<e:Group x="189" y="820" id="icon8">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt8" width="76" x="12" y="18.69" text="9" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="237" y="1072" id="icon9">
<e:Group x="319" y="900" id="icon9">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt9" width="76" x="12" y="18.69" text="10" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377" y="1137" id="icon10">
<e:Group x="455" y="970" id="icon10">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="11" font="nums_fnt" textAlign="center" id="txt10"/>
</e:Group>
<e:Group x="508" y="1254" id="icon11">
<e:Group x="433" y="1098" id="icon11">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="12" font="nums_fnt" textAlign="center" id="txt11"/>
</e:Group>
<e:Group x="359" y="1367" id="icon12">
<e:Group x="299" y="1164" id="icon12">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="13" font="nums_fnt" textAlign="center" id="txt12"/>
</e:Group>
<e:Group x="175" y="1245" id="icon13">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="14" font="nums_fnt" textAlign="center" id="txt13"/>
</e:Group>
<e:Group x="95" y="1380" id="icon14">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="15" font="nums_fnt" textAlign="center" id="txt14"/>
</e:Group>
<e:Group x="171" y="1493" id="icon15">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="16" font="nums_fnt" textAlign="center" id="txt15"/>
</e:Group>
<e:Group x="337" y="1548" id="icon16">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="17" font="nums_fnt" textAlign="center" id="txt16"/>
</e:Group>
<e:Group x="495" y="1611" id="icon17">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="18" font="nums_fnt" textAlign="center" id="txt17"/>
</e:Group>
<e:Group x="546" y="1734" id="icon18">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="19" font="nums_fnt" textAlign="center" id="txt18"/>
</e:Group>
<e:Group x="558" y="1882" id="icon19">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="20" font="nums_fnt" textAlign="center" id="txt19"/>
</e:Group>
<e:Group x="491" y="2023" id="icon20">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="21" font="nums_fnt" textAlign="center" id="txt20"/>
</e:Group>
<e:Group x="392" y="2180" id="icon21">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="22" font="nums_fnt" textAlign="center" id="txt21"/>
</e:Group>
<e:Image id="animal1" source="狮子_png" x="188" y="607" visible="false"/>
<e:Image id="animal2" source="animal1_png" x="232" y="567.5" visible="false"/>
</e:Skin>
\ No newline at end of file
......@@ -53,7 +53,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="recordBtn" label="" x="606.14" y="175" locked="true">
<e:Button id="recordBtn" label="" x="597" y="174.57" locked="true">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/>
......@@ -79,7 +79,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="signGroup" x="26.69" y="172.57">
<e:Group id="signGroup" x="26.69" y="172.57" locked="true">
<e:Button id="signBtn" label="" y="0" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -93,7 +93,7 @@
<e:Image id="sign_s2" source="map明日可领_png" x="1.33" y="0" visible="false"/>
</e:Group>
</e:Group>
<e:Group id="inviteGroup" x="16.69" y="323.76">
<e:Group id="inviteGroup" x="16.69" y="323.76" locked="true">
<e:Button id="inviteBtn" label="" x="10" y="1.54">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -107,7 +107,7 @@
<e:Label id="inviteTips" text="立即到账" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xffffff" size="18" fontFamily="FZY3JW"/>
</e:Group>
</e:Group>
<e:Group id="turnTableGroup" x="564.5" y="475" anchorOffsetX="0" width="159">
<e:Group id="turnTableGroup" x="564.5" y="475" anchorOffsetX="0" width="159" locked="true">
<e:Button id="turnTableBtn" label="" x="33.36" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -121,7 +121,7 @@
<e:Label id="turnTableTips" text="立即到" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xFFFFFF" size="18" fontFamily="FZY3JW"/>
</e:Group>
</e:Group>
<e:Group id="scratchGroup" y="631" right="27">
<e:Group id="scratchGroup" y="631" right="25" locked="true">
<e:Button id="scratchBtn" label="" y="0" x="-5.32">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -135,7 +135,7 @@
<e:Label id="scratchTips" text="立即到" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xFFFFFF" size="18" fontFamily="FZY3JW"/>
</e:Group>
</e:Group>
<e:Group id="taskGroup" y="325" right="30">
<e:Group id="taskGroup" y="325" right="30" locked="true">
<e:Button id="taskBtn" label="" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -150,7 +150,7 @@
</e:Group>
</e:Group>
<e:Group id="activitys" x="13.4" y="620.55" touchEnabled="false">
<e:Group id="actIconsGroup" x="12.12" y="0">
<e:Group id="actIconsGroup" x="-8.88" y="-4">
<e:Image id="actIconsBg2" source="map2+bg_png" x="-27.15" y="0" visible="false"/>
<e:Image id="actIconsBg1" x="-29.27" y="10" source="map2+bg2_png" visible="false"/>
<e:Group id="hbRainGroup" x="5" y="158" width="120" height="120">
......@@ -167,10 +167,10 @@
<e:Image id="act2Btn" source="map2红包大作战_png" x="0" y="0"/>
</e:Group>
</e:Group>
<e:Image id="actsShowBtn" source="map2+_png" x="4.98" y="1"/>
<e:Image id="actTips" source="maphot_png" x="94.82" y="-4.56"/>
<e:Image id="actsShowBtn" source="map2+_png" x="9.29" y="17.45"/>
<e:Image id="actTips" source="maphot_png" x="96.82" y="3.44"/>
</e:Group>
<e:Group id="settingsx" scaleX="1" scaleY="1" touchEnabled="false" bottom="23" left="30">
<e:Group id="settingsx" scaleX="1" scaleY="1" touchEnabled="false" bottom="23" left="30" locked="true">
<e:Group id="settingGroup" verticalCenter="0" horizontalCenter="0" visible="false">
<e:Image id="settingbg" source="设置bg_png" verticalCenter="0" horizontalCenter="0" scale9Grid="44,0,250,89"/>
<e:Button id="musicBtn" label="" horizontalCenter="-39" verticalCenter="0">
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapTop" width="750" height="1240" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapTop" width="750" height="1275" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map1_jpg" x="0" y="0"/>
<e:Group x="315" y="492" id="icon0">
<e:Group x="417" y="587" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="1" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="196" y="550.35">
<e:Image source="icon_png" x="0" y="0"/>
<e:Group id="icon1" x="455" y="691">
<e:Image source="icon_png" x="2.66" y="2.66"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="142" y="744" id="icon2">
<e:Group x="321.67" y="751.66" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="360" y="803" id="icon3">
<e:Group x="271.99" y="852.99" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="551" y="810" id="icon4">
<e:Group x="376.99" y="939.98" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="440" y="975" id="icon5">
<e:Group x="447.33" y="1028.99" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="1089.69" id="icon6">
<e:Group x="324.67" y="1088.99" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="180.01" y="1170.31" id="icon7">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="8" font="nums_fnt" textAlign="center"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StarSkin" width="67" height="25" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="无星星_png" />
<e:Image id="star1" source="有星星_png" visible="false"/>
<e:Image id="star2" source="有星星2_png" visible="false"/>
<e:Image id="star3" source="有星星3_png" visible="false"/>
<e:Skin class="StarSkin" width="76" height="31" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="无星星_png" horizontalCenter="0" verticalCenter="0"/>
<e:Image id="star1" source="有星星_png" horizontalCenter="0" verticalCenter="0" visible="false"/>
<e:Image id="star2" source="有星星2_png" horizontalCenter="0" verticalCenter="0" visible="false"/>
<e:Image id="star3" source="有星星3_png" horizontalCenter="0" verticalCenter="0" visible="false"/>
</e:Skin>
\ No newline at end of file
......@@ -8,7 +8,7 @@ import MapRpeatPart from "./MapRpeatPart";
import { getRepeatCount } from "../startScene/StartScene";
export default class MapBottomPart extends ComponentBase {
static LEVEL_NUMS = 12;
static LEVEL_NUMS = 3;
getTxt(i): eui.BitmapLabel { return this[`txt${i}`]; }
start({repeatHeight,topHeight}) {
super.start();
......
......@@ -6,7 +6,7 @@ import setGray from "../setGray";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
export default class MapRpeatPart extends ComponentBase {
static LEVEL_NUMS = 13;
static LEVEL_NUMS = 22;
private _index;
private _topHeight;
constructor(i,topHeight) {
......@@ -46,8 +46,8 @@ export default class MapRpeatPart extends ComponentBase {
// console.log(icon['visibleY'] );
}
this['animal1'].visible = this._index % 2;
this['animal2'].visible = !this['animal1'].visible;
// this['animal1'].visible = this._index % 2;
// this['animal2'].visible = !this['animal1'].visible;
}
getIcon(i) { return this[`icon${i}`]; }
......
......@@ -52,16 +52,16 @@ export default class MapScene extends Scene {
sendInvite() {
const code = Utils.getRequestByKey('shareCode');
if (!code) return;
if (doHelpFlag) {
if(!code) return;
if(doHelpFlag) {
return;
}
if (code.indexOf("12345678") == -1) { // 邀请有礼
if(code.indexOf("12345678") == -1) { // 邀请有礼
const dojoin = DataManager.ins.getData('hc_doJoin');
if (!dojoin) return;
if(!dojoin) return;
NetManager.ins.doHelp((success, res) => {
doHelpFlag = true;
switch (true) {
switch(true) {
case (res.code == "400017"):
showToast("您不是新用户呢~");
break;
......@@ -74,7 +74,7 @@ export default class MapScene extends Scene {
default:
break;
}
if (!success) {
if(!success) {
return;
}
showToast("助力成功");
......@@ -84,7 +84,7 @@ export default class MapScene extends Scene {
const _code = code.slice(8);
NetManager.ins.scratchDoHelp((success, res) => {
doHelpFlag = true;
switch (true) {
switch(true) {
case (res.code == "0000024"):
showToast("今日刮卡次数已达到上线限哦~");
break;
......@@ -97,7 +97,7 @@ export default class MapScene extends Scene {
default:
break;
}
if (!success) {
if(!success) {
return;
}
showToast("帮刮成功!");
......@@ -150,7 +150,7 @@ export default class MapScene extends Scene {
GDispatcher.dispatchEvent("getInviteInfo"); // 查询邀请信息,控制邀请有礼角标
this['avatar'].mask = this['avatarMask'];
if (getBgOn() && MapScene['firstPlayBgTag'] == true) {
if(getBgOn() && MapScene['firstPlayBgTag'] == true) {
playBg();
}
......@@ -167,12 +167,12 @@ export default class MapScene extends Scene {
const oldTimerStr2 = localStorage.getItem('nowTimer2Str' + window['CFG'].consumerId);
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
let { noticeAdvert } = hc_advert;
if (noticeAdvert == null) {
noticeAdvert = { enable: false }
let {noticeAdvert} = hc_advert;
if(noticeAdvert == null) {
noticeAdvert = {enable: false}
}
if (noticeAdvert && noticeAdvert.enable && nowTimerStr2 != oldTimerStr2) {
if(noticeAdvert && noticeAdvert.enable && nowTimerStr2 != oldTimerStr2) {
// if (!adTag) {
panels.push('ad');
// adTag = true;
......@@ -181,14 +181,14 @@ export default class MapScene extends Scene {
}
const backData = DataManager.ins.getData('hc_hasBackReward');
if (backData.success) {
if(backData.success) {
backData.success = false;
panels.push('BackIndex');
}
const { signInfoVO } = DataManager.ins.getData('getSignInfo');
if (signInfoVO && signInfoVO.continueDay < 7) { //表示明天还可以签到
if (signInfoVO.todaySigned == 0 && oldTimerStr != nowTimerStr) {
const {signInfoVO} = DataManager.ins.getData('getSignInfo');
if(signInfoVO && signInfoVO.continueDay < 7) { //表示明天还可以签到
if(signInfoVO.todaySigned == 0 && oldTimerStr != nowTimerStr) {
panels.push('sign');
localStorage.setItem('nowTimerStr' + window['CFG'].consumerId, nowTimerStr);
}
......@@ -197,12 +197,12 @@ export default class MapScene extends Scene {
// 红包雨强提示
const hbRainRes = DataManager.ins.getData(NetName.HBRAIN_BASEINFO);
if (hbRainRes.data) {
if (hbRainRes.data.currentSession || hbRainRes.data.nextSession) {
if(hbRainRes.data) {
if(hbRainRes.data.currentSession || hbRainRes.data.nextSession) {
const sessionId = hbRainRes.data.currentSession ? hbRainRes.data.currentSession.sessionIndex : hbRainRes.data.nextSession.sessionIndex; // 场次ID
const nowTimerStr3 = date.getTime() + sessionId + '';
const oldTimerStr3 = localStorage.getItem('nowTimer3Str' + window['CFG'].consumerId);
if (nowTimerStr3 != oldTimerStr3) {
if(nowTimerStr3 != oldTimerStr3) {
panels.push('HbCutTime');
localStorage.setItem('nowTimer3Str' + window['CFG'].consumerId, nowTimerStr3);
}
......@@ -211,11 +211,11 @@ export default class MapScene extends Scene {
// 任务中心可领奖强提示
let canShow = localStorage.getItem('taskCenter' + window['CFG'].consumerId);
if (canShow == 'true') {
if(canShow == 'true') {
const taskInfoRes = DataManager.ins.getData(NetName.GET_TASKINFO);
if (taskInfoRes && taskInfoRes.data && taskInfoRes.data.length > 0) {
for (let i = 0; i < taskInfoRes.data.length; i++) {
if (taskInfoRes.data[i].count > 0) {
if(taskInfoRes && taskInfoRes.data && taskInfoRes.data.length > 0) {
for(let i = 0; i < taskInfoRes.data.length; i++) {
if(taskInfoRes.data[i].count > 0) {
panels.push('task');
break;
}
......@@ -226,15 +226,15 @@ export default class MapScene extends Scene {
let res = DataManager.ins.getData('hc_redBombBaseInfo');
let _t = res.data.redBombSwitchTime;
if (res.data.remain > 0) {
if(res.data.remain > 0) {
let showBomb = localStorage.getItem('showBomb' + window['CFG'].consumerId);
if (showBomb != _t.toString()) {
if(showBomb != _t.toString()) {
localStorage.setItem('showBomb' + window['CFG'].consumerId, _t.toString());
panels.push('BombTips2Panel');
}
}
if (!readCache() && getHomeData().levels.length <= 0) { //引导
if(!readCache() && getHomeData().levels.length <= 0) { //引导
const guide = new GuideCon(() => {
PanelCtrl.instance.showPanels(panels, [], this.onAllPanelHide);
});
......@@ -274,19 +274,19 @@ 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 == window['total_level']) {
} else if(homeData.levels.length == window['total_level']) {
target = window['total_level'] + 1;
} else {
target = homeData.levels.length + 1;
}
for (const key in MapScene.iconHash) {
for(const key in MapScene.iconHash) {
const levelOrder = parseInt(key);
const element = MapScene.iconHash[key];
if (!element.hasEventListener(egret.TouchEvent.TOUCH_TAP)) {
if(!element.hasEventListener(egret.TouchEvent.TOUCH_TAP)) {
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if (
if(
(levelOrder > (getHomeData().levels.length + 1) && levelOrder > 1)
|| (levelOrder > window['last_level'])
) {
......@@ -299,7 +299,7 @@ export default class MapScene extends Scene {
}
}
if (homeData.levels.length < window['total_level']) {
if(homeData.levels.length < window['total_level']) {
const targetIcon = MapScene.iconHash[target];
const light = RES.getRes('lightani_png');
......@@ -312,7 +312,7 @@ export default class MapScene extends Scene {
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);
egret.Tween.get(pic, {loop: true}).to({scaleX: 2, scaleY: 2, alpha: 0}, 1000).wait(1000);
this['pic'] = pic;
}
......@@ -322,8 +322,8 @@ export default class MapScene extends Scene {
this.showLog();
this.updateBox();
if (data.level) {
if (homeData.remainEnargy == 0)
if(data.level) {
if(homeData.remainEnargy == 0)
PanelCtrl.instance.show('bloodPanel')
else
......@@ -331,8 +331,8 @@ export default class MapScene extends Scene {
}
this.stage.once(egret.TouchEvent.TOUCH_TAP, () => {
if (!MapScene['firstPlayBgTag']) {
if (getBgOn()) {
if(!MapScene['firstPlayBgTag']) {
if(getBgOn()) {
playBg();
}
MapScene['firstPlayBgTag'] = true;
......@@ -340,7 +340,7 @@ export default class MapScene extends Scene {
}, this);
let lastOrder = homeData.levels.length + 1;
if (homeData.levels.length >= window['total_level'])
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))
......@@ -351,7 +351,8 @@ export default class MapScene extends Scene {
Promise.all([
RES.getResAsync(`${key}_json`),
RES.getResAsync(`${key}_png`)]);
} catch (error) { }
} catch(error) {
}
RES.getResAsync('candydis0_json');
RES.getResAsync('candydis1_json');
......@@ -383,7 +384,7 @@ export default class MapScene extends Scene {
loadSvga(getResPath() + 'resource/assets/svgas/monster.svga');
// loadSvga(getResPath() + 'resource/assets/svgas/fireworks.svga');
if (!window['development']) {
if(!window['development']) {
RES.getResAsync(`inviterulepanel_json`);
}
}, 5 * 1000);
......@@ -394,7 +395,7 @@ export default class MapScene extends Scene {
}
onAllPanelHide = () => {
if (!localStorage.getItem('activityguide')) {
if(!localStorage.getItem('activityguide')) {
// NetManager.ins.hbRainBaseInfo((success, res) => {
// if(!success) {
// if(res.code == "600054" || res.code == "600055") {
......@@ -418,21 +419,21 @@ export default class MapScene extends Scene {
const y1 = this.stage.stageHeight + this.scroll.viewport.scrollV - offset;
// console.log(y0, y1);
let count = 0;
for (const key in MapScene.iconHash) {
for(const key in MapScene.iconHash) {
const icon = MapScene.iconHash[key];
if (icon['visibleY'] >= y0 && icon['visibleY'] <= y1) {
if(icon['visibleY'] >= y0 && icon['visibleY'] <= y1) {
icon.show();
} else if (icon.parent) {
} else if(icon.parent) {
icon.hide();
}
if (icon.parent)
if(icon.parent)
count++;
}
if (this._avatarsCache) {
if(this._avatarsCache) {
this._avatarsCache.forEach((item) => {
if (item.parent) item.parent.addChild(item);
if(item.parent) item.parent.addChild(item);
});
}
......@@ -453,32 +454,33 @@ export default class MapScene extends Scene {
}
private removeIcon() {
for (let k in this.icons) {
for(let k in this.icons) {
this.icons[k].destory();
}
this.icons = {};
this.actIcon.destory();
}
// 更新用户信息
updateMyInfo() {
this['avatar'].visible = false;
this['nameTxt'].text = '';
// NetManager.ins.hc_userInfo(() => {
this['avatar'].visible = true;
const { data } = DataManager.ins.getData('hc_userInfo');
if (data)
const {data} = DataManager.ins.getData('hc_userInfo');
if(data)
this['avatar'].source = data.avatar || "http://yun.duiba.com.cn/db_games/default_avatar.png";
else
this['avatar'].source = "http://yun.duiba.com.cn/db_games/default_avatar.png";
if (data && data.nickname)
if(data && data.nickname)
this['nameTxt'].text = getNick(data.nickname);
// });
}
updateSign() {
const { signInfoVO } = DataManager.ins.getData('getSignInfo');
if (signInfoVO && signInfoVO.continueDay < 7) { //表示明天还可以签到
const {signInfoVO} = DataManager.ins.getData('getSignInfo');
if(signInfoVO && signInfoVO.continueDay < 7) { //表示明天还可以签到
this['sign_s1'].visible = signInfoVO.todaySigned == 0;
this['sign_s2'].visible = !this['sign_s1'].visible;
} else {
......@@ -486,19 +488,20 @@ export default class MapScene extends Scene {
}
}
// 更新广告数据
updateAdData() {
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
let { mapAdvert } = hc_advert;
if (mapAdvert == null)
mapAdvert = { enable: false, advertList: [] }
let {mapAdvert} = hc_advert;
if(mapAdvert == null)
mapAdvert = {enable: false, advertList: []}
this['adBtn'].visible = mapAdvert.enable;
if (this['adBtn'].visible) {
if(this['adBtn'].visible) {
NetManager.ins.showLog(getlogItem(32));
}
if (mapAdvert.enable) {
if(mapAdvert.enable) {
let result;
result = mapAdvert.advertList;
if (Array.isArray(mapAdvert.advertList)) {
if(Array.isArray(mapAdvert.advertList)) {
const index = Math.floor(mapAdvert.advertList.length * Math.random());
result = mapAdvert.advertList[index];
}
......@@ -516,10 +519,10 @@ export default class MapScene extends Scene {
this.removeIcon();
this.actIcon.destory();
if (this['pic'])
if(this['pic'])
egret.Tween.removeTweens(this['pic']);
if (this.inviteTimer) {
if(this.inviteTimer) {
this.inviteTimer.stop();
this.inviteTimer.removeEventListener(egret.TimerEvent.TIMER, this.inviteCutTimer, this);
}
......@@ -527,17 +530,17 @@ export default class MapScene extends Scene {
this.scroll.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
this._avatarsCache.forEach((item) => {
if (item.parent) item.parent.removeChild(item);
if(item.parent) item.parent.removeChild(item);
});
this._avatarsCache = null;
}
getScrollV(lastOrder, stageHeight) {
if (lastOrder <= MapTopPart.LEVEL_NUMS) {//顶部的1-7
if(lastOrder <= MapTopPart.LEVEL_NUMS) {//顶部的1-8
return this.getScrollV1(lastOrder, stageHeight);
}
if (lastOrder > window['total_level'] - MapBottomPart.LEVEL_NUMS) {//底部的60-70关 70-10
if(lastOrder > window['total_level'] - MapBottomPart.LEVEL_NUMS) {//底部的60-70关 70-10
return this.getScrollV2(lastOrder, stageHeight);
}
//中部的4个循环*13 8~59
......@@ -545,10 +548,10 @@ export default class MapScene extends Scene {
}
getScrollV3(lastOrder, stageHeight) {
const ylist = [26, 158, 302, 435, 547, 674, 821, 897, 969, 1072, 1137, 1254, 1367];
const ylist = [62, 176, 314];
const y0 = this._data.top.height;//顶部的高度
let a0 = (lastOrder - MapTopPart.LEVEL_NUMS) % MapRpeatPart.LEVEL_NUMS; //减去7后的order 8-7 = 1
if (a0 == 0) a0 = MapRpeatPart.LEVEL_NUMS
if(a0 == 0) a0 = MapRpeatPart.LEVEL_NUMS;
const a1 = Math.ceil((lastOrder - MapTopPart.LEVEL_NUMS) / MapRpeatPart.LEVEL_NUMS) - 1;//当前地图repeat的顺序
const y1 = ylist[a0 - 1];
const y2 = y0 + y1 + a1 * this._data.list[0].height;
......@@ -556,9 +559,9 @@ export default class MapScene extends Scene {
}
getScrollV1(lastOrder, stageHeight) {
const ylist = [492, 550.35, 744, 803, 810, 975, 1089.69].map(i => i + 40);
const ylist = [587, 691, 749, 849, 932, 1025, 1085, 1161].map(i => i + 40);
const targetY = ylist[lastOrder - 1] - stageHeight / 2;
if (targetY <= 0) return 0
if(targetY <= 0) return 0;
return targetY;
}
......@@ -568,22 +571,48 @@ export default class MapScene extends Scene {
const totalHeight = this._data.top.height +
(this._data.list.length * this._data.list[0].height)
+ this._data.bottom.height;
const ylist = [44, 148.44, 331, 403, 513, 660, 829.69, 949.69, 1052.69, 1148.69, 1209.69].map(i => i + 40);
const ylist = [4, 55, 160, 315, 431, 529, 594, 714, 820, 900, 970, 1098, 1164, 1245, 1380, 1493, 1548, 1611, 1734, 1882, 2023, 2180].map(i => i + 40);
const targetY = y0 + ylist[lastOrder - 1] - stageHeight / 2;
if (targetY >= (totalHeight - stageHeight)) return totalHeight - stageHeight
if(targetY >= (totalHeight - stageHeight)) return totalHeight - stageHeight;
return targetY;
}
// 设置关卡图标为未开启
disableIcon(level) {
this.setGray(level);
MapScene.starHash[level].visible = false;
}
// 设置关卡图标为已开启
enableIcon(level) {
this.resetGray(level);
MapScene.starHash[level].visible = true;
}
// 设置关卡图标为当前关卡
nowIcon(level) {
const icon = MapScene.iconHash[level];
(icon['nums'] as eui.Image).source = 'iconnow_png';
(icon['bmptxt'] as eui.BitmapLabel).visible = true;
(icon['bmptxt'] as eui.BitmapLabel).font = 'nums3_fnt';
MapScene.starHash[level].visible = true;
}
setGray(order: number) {
const icon = MapScene.iconHash[order];
(icon['nums'] as eui.Image).source = 'icongray_png';
(icon['bmptxt'] as eui.BitmapLabel).visible = false;
// (icon['bmptxt'] as eui.BitmapLabel).font = 'nums3_fnt';
}
resetGray(order: number) {
const icon = MapScene.iconHash[order];
(icon['nums'] as eui.Image).source = 'icon_png';
(icon['bmptxt'] as eui.BitmapLabel).visible = true;
(icon['bmptxt'] as eui.BitmapLabel).font = 'nums_fnt';
}
showLog() {
NetManager.ins.showLog(getlogItem(1));
NetManager.ins.showLog(getlogItem(2));
......@@ -593,7 +622,7 @@ export default class MapScene extends Scene {
updateBox() {
const homeData = getHomeData();
if (homeData.canReceiveTreasureBoxNum <= 0)
if(homeData.canReceiveTreasureBoxNum <= 0)
setGray(this['box']);
this['boxiconWrapper'].visible = homeData.canReceiveTreasureBoxNum > 0;
this['totalStarTxt'].text = `${homeData.totalStars}/${homeData.nextRangeStarsNum}`;
......@@ -608,6 +637,7 @@ export default class MapScene extends Scene {
private _avatarsCache = [];
//添加地图页头像
addAvatar(level, ele?) {
const item = MapScene.iconHash[level];
const parent = item['mappart'];
......@@ -615,22 +645,23 @@ export default class MapScene extends Scene {
avatar.loadSkin();
avatar.start(ele);
parent.addChild(avatar);
avatar.x = item.x + 10;
avatar.y = item.y - avatar.height - 30;
if (!MapScene.starHash[level].visible) {
avatar.x = item.x + 6;
avatar.y = item.y - avatar.height + 10;
if(!MapScene.starHash[level].visible) {
avatar.y = item.y - avatar.height;
}
this._avatarsCache.push(avatar);
}
// 更新地图上的排行榜
updateFriends() {
NetManager.ins.hc_mapRank(() => {
const hc_mapRank = DataManager.ins.getData('hc_mapRank').data;
if (!hc_mapRank) return;
const { data } = DataManager.ins.getData('hc_userInfo');
if(!hc_mapRank) return;
const {data} = DataManager.ins.getData('hc_userInfo');
hc_mapRank.forEach((ele) => {
if (ele.levelNum == getHomeData().levels.length + 1) {
if (data == null)
if(ele.levelNum == getHomeData().levels.length + 1) {
if(data == null)
ele.rank[0].avatar = "http://yun.duiba.com.cn/db_games/default_avatar.png";
else
ele.rank[0].avatar = data.avatar || "http://yun.duiba.com.cn/db_games/default_avatar.png";
......@@ -645,28 +676,28 @@ export default class MapScene extends Scene {
this['goldTxt'].text = `${homeData.wealth}`;
for (let j = 1; j < window['total_level']; j++) {
for(let j = 1; j < window['total_level']; j++) {
this.disableIcon(j + 1);
}
for (let i = 0; i < homeData.levels.length; i++) {
for(let i = 0; i < homeData.levels.length; i++) {
const level = homeData.levels[i];
const star = MapScene.starHash[i + 1];
if (level) {
if(level) {
star.setStar(level.stars);
this.enableIcon(level.levelNum);
} else {
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 == window['last_level']) {
} else if(homeData.levels.length == window['last_level']) {
} else {
const star = MapScene.starHash[homeData.levels.length + 1];
this.enableIcon(homeData.levels.length + 1);
this.nowIcon(homeData.levels.length + 1);
}
this.updateTimerView();
......@@ -676,11 +707,11 @@ export default class MapScene extends Scene {
updateTimerView() {
//更新倒计时
if (this._countDown == null) {
if(this._countDown == null) {
this._countDown = new CountDown(this['countdown']);
}
const data = getHomeData();
if (data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
if(data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
this._countDown.stop();
this['fullTxt'].visible = true;
......@@ -707,28 +738,28 @@ export default class MapScene extends Scene {
onTap_inviteBtn() {
NetManager.ins.clickLog(getlogItem(33));
NetManager.ins.getInviteInfo((success, res) => {
if (!success || !res.data) {
if(!success || !res.data) {
return;
}
const flag = res.data.completeFlag;
switch (true) {
switch(true) {
case (flag == 0): // 未完成
this.loadsvga(res);
break;
case (flag == 1): // 完成未开奖 待领奖 请求领奖接口
try {
if (window['getRST']) window['getRST']();
} catch (error) {
if(window['getRST']) window['getRST']();
} catch(error) {
console.warn(error)
}
NetManager.ins.acceptInvitationPrize((success, res) => {
if (!success) {
if(!success) {
showToast("哎呀,萌狮开小差啦!\n过会再来看吧!");
GDispatcher.dispatchEvent("getInviteInfo");
return;
}
// console.log(res.data);
if (res.data.completeFlag == 3) {
if(res.data.completeFlag == 3) {
showToast("哎呀,萌狮开小差啦!\n过会再来看吧!");
GDispatcher.dispatchEvent("getInviteInfo");
} else {
......@@ -743,7 +774,7 @@ export default class MapScene extends Scene {
case (flag == 4): // 可以开启下一次发任务
NetManager.ins.acceptInvitationInfo((success, res) => {
if (!success) {
if(!success) {
return;
}
this.loadsvga(res);
......@@ -759,7 +790,7 @@ export default class MapScene extends Scene {
}
loadsvga(res) {
if (MapScene['svga']) {
if(MapScene['svga']) {
const mv = MapScene['svga']
mv.gotoAndStop(1);
res.data.svga = mv;
......@@ -784,21 +815,21 @@ export default class MapScene extends Scene {
*/
getInviteInfo() {
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
const { mapAdvert } = hc_advert;
const {mapAdvert} = hc_advert;
// tslint:disable-next-line: cyclomatic-complexity
NetManager.ins.getInviteInfo((success, res) => {
if (!success || !res.data) {
if(!success || !res.data) {
return;
}
const flag = res.data.completeFlag;
if (this.inviteTimer) {
if(this.inviteTimer) {
this.inviteTimer.stop();
}
switch (true) {
switch(true) {
case (flag == 0): // 未完成 显示倒计时
this["inviteGroup"].visible = true;
this["inviteGroup"].touchEnabled = true;
if (!mapAdvert || mapAdvert.enable == false) {
if(!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
......@@ -815,7 +846,7 @@ export default class MapScene extends Scene {
NetManager.ins.showLog(getlogItem(33));
this["inviteGroup"].visible = true;
this["inviteGroup"].touchEnabled = true;
if (!mapAdvert || mapAdvert.enable == false) {
if(!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
......@@ -827,7 +858,7 @@ export default class MapScene extends Scene {
case (flag == 3): // 领奖失败 无角标
this["inviteGroup"].visible = true;
this["inviteGroup"].touchEnabled = true;
if (!mapAdvert || mapAdvert.enable == false) {
if(!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
......@@ -838,7 +869,7 @@ export default class MapScene extends Scene {
case (flag == 4): // 可以开启下一次发任务 显示立即到账
this["inviteGroup"].visible = true;
this["inviteGroup"].touchEnabled = true;
if (!mapAdvert || mapAdvert.enable == false) {
if(!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
......@@ -850,7 +881,7 @@ export default class MapScene extends Scene {
case (flag == 5): // 等待开启下一次发任务 无角标
this["inviteGroup"].visible = true;
this["inviteGroup"].touchEnabled = true;
if (!mapAdvert || mapAdvert.enable == false) {
if(!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
......@@ -862,7 +893,7 @@ export default class MapScene extends Scene {
this["inviteGroup"].visible = false;
this["inviteGroup"].touchEnabled = false;
this['adBtn'].y = 323.76;
if (mapAdvert && mapAdvert.enable) {
if(mapAdvert && mapAdvert.enable) {
this['guideInner'].y = 185;
this['activitys'].y = 458;
} else {
......@@ -879,7 +910,7 @@ export default class MapScene extends Scene {
// 倒计时
private inviteCutTimer() {
const timer = this.convertTime(this.cutTime -= 1000);
if (timer.hour === "00"
if(timer.hour === "00"
&& timer.min === "00"
&& timer.sec === "00") {
this.inviteTimer.stop();
......@@ -972,9 +1003,9 @@ export default class MapScene extends Scene {
async onTap_boxLayer() {
NetManager.ins.clickLog(getlogItem(1));
const data = getHomeData();
if (data.canReceiveTreasureBoxNum > 0) {
if(data.canReceiveTreasureBoxNum > 0) {
this['boxLayer'].visible = true;
if (!this._mc)
if(!this._mc)
this._mc = await loadSvga(getResPath() + 'resource/assets/svgas/box.svga', this['boxani']);
this._mc.stop();
this._mc.gotoAndStop(1);
......@@ -986,18 +1017,18 @@ export default class MapScene extends Scene {
await wait(50);
this._mc.visible = true;
const a = 100, b = 10;
egret.Tween.get(this._mc, { loop: true }).set({ rotation: b })
.to({ rotation: -b }, a).to({ rotation: b }, a)
.to({ rotation: -b }, a).to({ rotation: b }, a)
.to({ rotation: -b }, a).to({ rotation: b }, a)
.to({ rotation: 0 }, a / 2)
egret.Tween.get(this._mc, {loop: true}).set({rotation: b})
.to({rotation: -b}, a).to({rotation: b}, a)
.to({rotation: -b}, a).to({rotation: b}, a)
.to({rotation: -b}, a).to({rotation: b}, a)
.to({rotation: 0}, a / 2)
.wait(1000);
}
}
async playAni() {
if (this._mc) {
if(this._mc) {
egret.Tween.removeTweens(this._mc);
this._mc.gotoAndPlay(1, true);
await this.onPlaySTOP();
......@@ -1008,7 +1039,7 @@ export default class MapScene extends Scene {
async onPlaySTOP() {
return new Promise((r) => {
const func = () => {
if (this._mc.currentFrame >= 100) {
if(this._mc.currentFrame >= 100) {
this._mc.removeEventListener(egret.Event.ENTER_FRAME, func, this);
this._mc.stop();
r();
......@@ -1027,14 +1058,14 @@ export default class MapScene extends Scene {
this['boxani'].touchChildren = false;
await this.playAni();
try {
if (window['getRST']) window['getRST']();
} catch (error) {
if(window['getRST']) window['getRST']();
} catch(error) {
console.warn(error)
}
NetManager.ins.hc_openTreasureBox((success) => {
this['boxani'].touchEnabled = true;
this['boxani'].touchChildren = true;
if (success) {
if(success) {
const hc_openTreasureBox = DataManager.ins.getData('hc_openTreasureBox');
const boxdata = hc_openTreasureBox.data;
const homeData = DataManager.ins.getData('hc_home').data;
......@@ -1044,7 +1075,7 @@ export default class MapScene extends Scene {
homeData.isGetAllTreasureBox = boxdata.isGetAllTreasureBox;
this.updateBox();
if (hc_openTreasureBox.success && boxdata && boxdata.option) {
if(hc_openTreasureBox.success && boxdata && boxdata.option) {
PanelCtrl.instance.show('box');
} else {
......@@ -1078,24 +1109,12 @@ export default class MapScene extends Scene {
onTap_bloodBtn() {
NetManager.ins.clickLog(getlogItem(2));
if (getHomeData().remainEnargy > 0)
if(getHomeData().remainEnargy > 0)
PanelCtrl.instance.show('bloodPanel');
else
PanelCtrl.instance.show('blood2Panel');
}
setGray(order: number) {
const icon = MapScene.iconHash[order];
(icon['nums'] as eui.Image).source = 'icongray_png';
(icon['bmptxt'] as eui.BitmapLabel).font = 'nums3_fnt';
}
resetGray(order: number) {
const icon = MapScene.iconHash[order];
(icon['nums'] as eui.Image).source = 'icon_png';
(icon['bmptxt'] as eui.BitmapLabel).font = 'nums_fnt';
}
get skinKey() {
return 'Map'
}
......@@ -1103,14 +1122,14 @@ export default class MapScene extends Scene {
showRedBagAni() {
const hash = MapScene.iconHash;
const keys = [];
for (const key in hash) {
for(const key in hash) {
const ele = hash[key];
if (ele.parent)
if(ele.parent)
keys.push(key);
}
const p0 = new egret.Point(750 / 2, 750 / 1.5);
const pics = [];
for (const key of keys) {
for(const key of keys) {
const icon = MapScene.iconHash[key] as egret.DisplayObject;
const p = (icon.localToGlobal(0, 0));
const pic = createRedBagIcon(this);
......@@ -1127,7 +1146,7 @@ export default class MapScene extends Scene {
pic.visible = true;
const p2 = pic['__p2__'] as egret.Point;
let dir = 100;
if (p2.y < p0.y)
if(p2.y < p0.y)
dir *= -1;
const p1x = (p0.x + p2.x) / 2 + dir;
const p1y = (p0.y + p2.y) / 2;
......@@ -1137,16 +1156,16 @@ export default class MapScene extends Scene {
this.addChild(mc);
const x0 = pic['__icon__'].x;
const y0 = pic['__icon__'].y;
egret.Tween.get(pic['__icon__']).to({ y: y0 + 10 }, 100).to({ y: y0 }, 100);
egret.Tween.get(pic['__icon__']).to({y: y0 + 10}, 100).to({y: y0}, 100);
const light = new egret.Bitmap(RES.getRes('maplight2_png'));
light.anchorOffsetX = 75;
light.anchorOffsetY = 49;
light.x = 50;
light.y = 40 + 5;
pic['__icon__'].addChildAt(light, 0);
egret.Tween.get(light).to({ scaleX: 1.5, scaleY: 1.5, }, 200).call(() => {
egret.Tween.get(light).to({scaleX: 1.5, scaleY: 1.5,}, 200).call(() => {
pic['__icon__'].removeChild(light);
if (index == pics.length - 1) {
if(index == pics.length - 1) {
showToast('红包隐藏在任意关卡中,快去找他们吧~');
}
});
......@@ -1156,9 +1175,9 @@ export default class MapScene extends Scene {
}
}
export const getNick = (nickname, max = 4) => {
if (!nickname) return nickname;
if(!nickname) return nickname;
if (nickname.length > max)
if(nickname.length > max)
return nickname.slice(0, max) + '...';
return nickname;
}
\ No newline at end of file
......@@ -3,28 +3,29 @@ import ComponentBase from "../../libs/new_wx/components/ComponentBase";
export default class MapStarComp extends ComponentBase {
start() {
super.start();
this.x = 15;
this.y=-24;
this.x = 13;
this.y = 67;
this.setStar(0);
}
setStar(num:number)
{
this['star1'].visible=false;
this['star2'].visible=false;
this['star3'].visible=false;
setStar(num: number) {
this['star1'].visible = false;
this['star2'].visible = false;
this['star3'].visible = false;
if(num ==0) {
}else if(num ==1) {
this['star1'].visible=true;
}
else if(num ==2) {
this['star2'].visible=true;
}else if(num ==3) {
this['star3'].visible=true;
if(num == 0) {
} else if(num == 1) {
this['star1'].visible = true;
} else if(num == 2) {
this['star2'].visible = true;
} else if(num == 3) {
this['star3'].visible = true;
}
}
get skinKey(): string { return 'Star' }
get skinKey(): string {
return 'Star'
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ import MapStarComp from "./MapStarComp";
import { createData } from "../startScene/StartScene";
export default class MapTopPart extends ComponentBase {
static LEVEL_NUMS = 7;
static LEVEL_NUMS = 8;
start() {
super.start();
for (let i = 0; i < MapTopPart.LEVEL_NUMS; i++) {
......
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