Commit fe34506f authored by 邱旭's avatar 邱旭

1

parents 88862f81 20fc3aef
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
......@@ -132,9 +132,9 @@
{nums: '0.36元', type: 'quan36'}
];
// localStorage.clear();
window['imgver'] = '11112'
window['total_level'] = 18 + 13 * 16;
window['last_level'] = 225;//必须大于等于total_level
window['imgver'] = '11112';
window['total_level'] = 14 + 13 * 17; /// TODO 14 不能变 总数必须大于总的关卡数
window['last_level'] = 225;//必须大于等于total_level ///TODO 标记最后一关,等于最后一关即可
// localStorage.clear();
......
......@@ -76,6 +76,7 @@ import TaskCenterNoPrize from "../../src/panels/TaskCenter/TaskCenterNoPrize";
import { GDispatcher } from "../tc/util/GDispatcher";
import ShopTipPanel from "../../src/panels/ShopTipPanel";
import RechargePanel from "../../src/panels/RechargePanel";
import BombTips2Panel from "../../src/panels/BombTips2Panel";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -155,6 +156,7 @@ export default class MainBase extends eui.UILayer {
['friend', { cls: FriendPanel }],
['ad', { cls: ADPanel }],
['BombTipsPanel', { cls: BombTipsPanel }],
['BombTips2Panel', { cls: BombTips2Panel }],
['RedBombAlert', { cls: RedBombAlertPanel }],
['RedBombRule', { cls: RedBombRule }],
['task', { cls: TaskCenter }],
......@@ -248,6 +250,7 @@ export default class MainBase extends eui.UILayer {
}
else {
RES.getResAsync('mapredbagicom_png');
RES.getResAsync('mapredbagicom2_png');
RES.getResAsync('maplight2_png');
RES.getResAsync('main_mapbottom_png');
RES.getResAsync('lightani_png');
......@@ -324,9 +327,14 @@ export default class MainBase extends eui.UILayer {
for (var i = 1; i <= 13; i++) {
RES.getResAsync("lineLight" + i + "_png")
}
for (var i = 0; i <= 8; i++) {
RES.getResAsync("线条尾部炸开_0000" + i + "_png");
}
var arr = [
"alert_blood","alert_prop1","alert_prop2","alert_prop3","alert_yb",
"rectLatWhite",
"fesRedBigLight", "fesRedBombSta1", "fesRedCap", "fesRedDown", "fesRedSmallLight", "fesRedUp", "xingxingbi",
"redBombBStar","redBombYStar","redBombBSnow",
"fesRedBigLight", "fesRedBombSta1", "fesRedBombSta2", "fesRedCap", "fesRedDown", "fesRedSmallLight", "fesRedUp", "xingxingbi",
"tinyRedLeft", "tinyRedMid", "tinyRedRight",
"festivalTargetBg",
"hairballDisBg",
......@@ -406,7 +414,8 @@ export default class MainBase extends eui.UILayer {
this.svgaList = await Promise.all([
loadSvga(getResPath() + 'resource/assets/svgas/loading_progress.svga'),
loadSvga(getResPath() + 'resource/assets/svgas/loading_animals.svga'),
loadSvga(getResPath() + 'resource/assets/svgas/loading_title.svga')
loadSvga(getResPath() + 'resource/assets/svgas/loading_title.svga'),
loadSvga(getResPath() + 'resource/assets/svgas/拖尾结束.svga')
]);
loadSvga(getResPath() + 'resource/assets/svgas/box.svga');
loadSvga(getResPath() + 'resource/assets/svgas/invite.svga');
......@@ -482,14 +491,15 @@ export default class MainBase extends eui.UILayer {
}
protected async createGameScene() {
window['getaward'] = () => { getRedBombAward((param) => { console.log(param) }) }
window['getaward'] = () => { getRedBombAward((param) => { console.log(param) }) };
localStorage.setItem('taskCenter' + window['CFG'].consumerId, 'true'); // 任务中心强提示,每次进入游戏只强提示一次
await Promise.all([
this.getAd(),
this.ajaxElement(),
this.hcHome(),
this.hc_userInfo(),
// this.getBackReward(),
// this.hcRedBoobBaseInfo(),
this.hcRedBoobBaseInfo(),
]);
MapScene.adData = DataManager.ins.getData('hc_advert');
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"map","version":5,"files":["../assets/map/宝箱.png","../assets/map/宝箱1.png","../assets/map/宝箱2.png","../assets/map/宝箱3.png","../assets/map/宝箱bg.png","../assets/map/宝箱btn.png","../assets/map/道具.png","../assets/map/关闭 拷贝.png","../assets/map/光 副本 4.png","../assets/map/设置.png","../assets/map/设置bg.png","../assets/map/声音.png","../assets/map/声音关闭.png","../assets/map/狮子.png","../assets/map/退出.png","../assets/map/问题.png","../assets/map/无星星.png","../assets/map/星星.png","../assets/map/星星bg.png","../assets/map/音乐.png","../assets/map/音乐关闭.png","../assets/map/有星星.png","../assets/map/有星星2.png","../assets/map/有星星3.png","../assets/map/元宝bg.png","../assets/map/ad_icon.png","../assets/map/animal1.png","../assets/map/avatar.png","../assets/map/friend_avatar.png","../assets/map/guideBox.png","../assets/map/guideLevel.png","../assets/map/guideLove.png","../assets/map/guideMoney.png","../assets/map/guideOver.png","../assets/map/icon.png","../assets/map/iconbg.png","../assets/map/icongray.png","../assets/map/invite_icon.png","../assets/map/invite_txtbg.png","../assets/map/lionMsgBg.png","../assets/map/map_signicon.png","../assets/map/map2+.png","../assets/map/map2+bg.png","../assets/map/map2红包大作战.png","../assets/map/map2热门引导.png","../assets/map/map2周一红包雨.png","../assets/map/map大转盘.png","../assets/map/map刮现金红包.png","../assets/map/map今日可领.png","../assets/map/map明日可领.png","../assets/map/maphot.png","../assets/map/msgTri.png","../assets/map/namebg.png","../assets/map/progress1.png","../assets/map/progress2.png","../assets/map/recordbtn.png","../assets/map/taskicon.png","../assets/map/map2+bg2.png","../assets/map/mapredbagicom.png","../assets/map/maplight2.png","../assets/map/taskBtn.png","../assets/map/txtbg_blue.png","../assets/map/txtbg_orange.png","../assets/map/txtbg_purple.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"map","version":5,"files":["../assets/map/宝箱.png","../assets/map/宝箱1.png","../assets/map/宝箱2.png","../assets/map/宝箱3.png","../assets/map/宝箱bg.png","../assets/map/宝箱btn.png","../assets/map/道具.png","../assets/map/关闭 拷贝.png","../assets/map/光 副本 4.png","../assets/map/设置.png","../assets/map/设置bg.png","../assets/map/声音.png","../assets/map/声音关闭.png","../assets/map/狮子.png","../assets/map/退出.png","../assets/map/问题.png","../assets/map/无星星.png","../assets/map/星星.png","../assets/map/星星bg.png","../assets/map/音乐.png","../assets/map/音乐关闭.png","../assets/map/有星星.png","../assets/map/有星星2.png","../assets/map/有星星3.png","../assets/map/元宝bg.png","../assets/map/ad_icon.png","../assets/map/animal1.png","../assets/map/avatar.png","../assets/map/friend_avatar.png","../assets/map/guideBox.png","../assets/map/guideLevel.png","../assets/map/guideLove.png","../assets/map/guideMoney.png","../assets/map/guideOver.png","../assets/map/icon.png","../assets/map/iconbg.png","../assets/map/icongray.png","../assets/map/invite_icon.png","../assets/map/invite_txtbg.png","../assets/map/lionMsgBg.png","../assets/map/map_signicon.png","../assets/map/map2+.png","../assets/map/map2+bg.png","../assets/map/map2红包大作战.png","../assets/map/map2热门引导.png","../assets/map/map2周一红包雨.png","../assets/map/map大转盘.png","../assets/map/map刮现金红包.png","../assets/map/map今日可领.png","../assets/map/map明日可领.png","../assets/map/maphot.png","../assets/map/msgTri.png","../assets/map/namebg.png","../assets/map/progress1.png","../assets/map/progress2.png","../assets/map/recordbtn.png","../assets/map/taskicon.png","../assets/map/map2+bg2.png","../assets/map/mapredbagicom.png","../assets/map/maplight2.png","../assets/map/taskBtn.png","../assets/map/txtbg_blue.png","../assets/map/txtbg_orange.png","../assets/map/txtbg_purple.png","../assets/map/mapredbagicom2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/mainScene/线条尾部炸开_00000.png","../assets/mainScene/线条尾部炸开_00001.png","../assets/mainScene/线条尾部炸开_00002.png","../assets/mainScene/线条尾部炸开_00003.png","../assets/mainScene/线条尾部炸开_00005.png","../assets/mainScene/线条尾部炸开_00004.png","../assets/mainScene/线条尾部炸开_00006.png","../assets/mainScene/线条尾部炸开_00008.png","../assets/mainScene/线条尾部炸开_00007.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"redbombalert","version":5,"files":["../assets/redbombalert/redbombalert文案.png","../assets/redbombalert/redAlert_btn.png","../assets/redbombalert/alert_yb.png","../assets/redbombalert/alert_prop3.png","../assets/redbombalert/alert_prop2.png","../assets/redbombalert/alert_prop1.png","../assets/redbombalert/alert_blood.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"redbombtips2","version":5,"files":["../assets/redbombtips/redbagtips_ele.png","../assets/redbombtips/redbagtips_ele1.png","../assets/redbombtips/redbagtips_ele2.png","../assets/redbombtips/redbagtips_ele3.png","../assets/redbombtips/redbagtips_light.png","../assets/redbombtips/redbagtips按钮.png","../assets/redbombtips/redbagtips活动规则.png","../assets/redbombtips/redbagtipsbg.png","../assets/redbombtips/redbagtips_ele7.png"]}
\ No newline at end of file
egret/resource/assets/map/icon.png

9.52 KB | W: | H:

egret/resource/assets/map/icon.png

8.34 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/icongray.png

6.53 KB | W: | H:

egret/resource/assets/map/icongray.png

6.24 KB | W: | H:

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

173 KB | W: | H:

egret/resource/assets/map/map1.jpg

454 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

520 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

446 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/share3.jpg

432 KB | W: | H:

egret/resource/assets/share3.jpg

400 KB | W: | H:

egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -58,6 +58,7 @@
"resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.exml",
"resource/skins/RedBombTips2Skin.exml",
"resource/skins/RedBombTipsSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
......
......@@ -4,9 +4,9 @@
<e:Image y="59.5" source="hbPrize_bg_png" horizontalCenter="0"/>
<e:Image id="img" width="508" height="225" source="{data.url}" y="466.96" horizontalCenter="0"/>
<e:Image id="money" source="signprize元宝_png" y="465.4" scaleX="0.8" scaleY="0.8" horizontalCenter="0" visible="false"/>
<e:Image id="blood" source="singprize体力_png" y="428" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="397.38" y="473.6" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Image id="blood" source="singprize体力_png" y="428" horizontalCenter="0"/>
<e:Group id="numsgroup" x="411.02" y="470.56" scaleX="1.5" scaleY="1.5">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Button id="ok_btn" label="" y="826" anchorOffsetX="150" anchorOffsetY="48" horizontalCenter="0">
......
<?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="1363" 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="223.88" y="64" 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:BitmapLabel id="txt0" width="76" x="10" y="13" text="60" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="541.97" y="148.44">
<e:Group id="icon1" x="124.7" y="248.44">
<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:BitmapLabel id="txt1" width="76" x="10" y="13" text="61" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="524" y="331" id="icon2">
<e:Group x="189" y="388" 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:BitmapLabel id="txt2" width="76" x="8" y="13" text="62" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="329.94" y="403" id="icon3">
<e:Group x="328.94" y="481" 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:BitmapLabel id="txt3" width="76" x="10" y="13" text="63" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="83" y="513" id="icon4">
<e:Group x="483" y="592" 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:BitmapLabel id="txt4" width="76" x="10" y="13" text="64" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="304" y="660" id="icon5">
<e:Group x="562" y="746" 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:BitmapLabel id="txt5" width="76" x="10" y="13" text="65" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="829.69" id="icon6">
<e:Group x="442.01" y="902.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:BitmapLabel id="txt6" width="76" x="10" y="13" text="66" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="149.01" y="949.69" id="icon7">
<e:Group x="453.01" y="892.69" id="icon7" visible="false">
<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:BitmapLabel id="txt7" width="76" x="10" y="13" text="67" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="317.01" y="1052.69" id="icon8">
<e:Group x="309.01" y="1052.69" id="icon8" visible="false">
<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:BitmapLabel id="txt8" width="76" x="10" y="13" text="68" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="507.01" y="1148.69" id="icon9">
<e:Group x="95.01" y="1145.69" id="icon9" visible="false">
<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:BitmapLabel id="txt9" width="76" x="10" y="13" text="69" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377.01" y="1209.69" id="icon10">
<e:Group x="202.01" y="1255.69" id="icon10" visible="false">
<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:BitmapLabel id="txt10" width="76" x="10" y="13" text="70" 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="1634" 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="359" y="136.01" 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="10" y="13" text="1" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="196" y="158" id="icon1">
<e:Group x="244" y="251" 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:BitmapLabel id="txt1" width="76" x="10" y="13" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="143" y="302" id="icon2">
<e:Group x="218" y="403" 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:BitmapLabel id="txt2" width="76" x="10" y="12" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="235" y="435" id="icon3">
<e:Group x="350" y="495" 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:BitmapLabel id="txt3" width="76" x="10" y="12" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="348" y="547" id="icon4">
<e:Group x="528" y="547" 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:BitmapLabel id="txt4" width="76" x="10" y="12" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="499" y="674" id="icon5">
<e:Group x="609" y="663" 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:BitmapLabel id="txt5" width="76" x="10" y="12" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="390" y="821" id="icon6">
<e:Group x="495" y="794" 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:BitmapLabel id="txt6" width="76" x="10" y="12" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="218" y="897" id="icon7">
<e:Group x="333" y="885" 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:BitmapLabel id="txt7" width="76" x="10" y="12" text="8" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="28" y="969" id="icon8">
<e:Group x="187" y="972" 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:BitmapLabel id="txt8" width="76" x="10" y="12" text="9" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="237" y="1072" id="icon9">
<e:Group x="290" y="1109" 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:BitmapLabel id="txt9" width="76" x="10" y="12" text="10" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377" y="1137" id="icon10">
<e:Group x="408" y="1249.12" 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:BitmapLabel width="76" x="10" y="12" text="11" font="nums_fnt" textAlign="center" id="txt10"/>
</e:Group>
<e:Group x="508" y="1254" id="icon11">
<e:Group x="348" y="1379.76" 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:BitmapLabel width="76" x="10" y="12" text="12" font="nums_fnt" textAlign="center" id="txt11"/>
</e:Group>
<e:Group x="359" y="1367" 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 x="324" y="1527.61" id="icon12">
<e:Image source="icon_png" x="-1" y="0"/>
<e:BitmapLabel width="76" x="10" y="13" text="13" font="nums_fnt" textAlign="center" id="txt12"/>
</e:Group>
<e:Image id="animal1" source="狮子_png" x="201.68" y="651.02" anchorOffsetX="0" width="152.81" anchorOffsetY="0" height="132.72"/>
<e:Image id="animal1" source="狮子_png" x="201.68" y="651.02" anchorOffsetX="0" width="152.81" anchorOffsetY="0" height="132.72" visible="false"/>
<e:Image id="animal2" source="animal1_png" x="232" y="567.5" visible="false"/>
</e:Skin>
\ No newline at end of file
......@@ -149,9 +149,9 @@
</e:Group>
<e:Group id="activitys" x="13.4" y="620.55" touchEnabled="false">
<e:Group id="actIconsGroup" x="12.12" y="0">
<e:Image id="actIconsBg1" source="map2+bg_png" x="-27.15" y="0" visible="false"/>
<e:Image id="actIconsBg2" x="-29.27" y="10" source="map2+bg2_png"/>
<e:Group id="hbRainGroup" x="4.27" y="157.5" width="120" height="120">
<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">
<e:Button id="hbRainBtn" label="" y="-1" x="0">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -161,7 +161,9 @@
</e:skinName>
</e:Button>
</e:Group>
<e:Image id="act2Btn" source="map2红包大作战_png" x="157.76" y="159" visible="false"/>
<e:Group id="act2Group" x="157" y="158">
<e:Image id="act2Btn" source="map2红包大作战_png" x="0" y="0"/>
</e:Group>
</e:Group>
<e:Image id="actsShowBtn" source="map2+_png" x="-7.64" y="5.45"/>
<e:Image id="actTips" source="maphot_png" x="91.52" y="15.72"/>
......
<?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="1305" 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="448" y="496.04" 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:BitmapLabel width="76" x="10" y="12" text="1" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="196" y="550.35">
<e:Group id="icon1" x="490" y="625">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="2" font="nums_fnt" textAlign="center"/>
<e:BitmapLabel width="76" x="10" y="12" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="142" y="744" id="icon2">
<e:Group x="573.33" y="745.37" 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:BitmapLabel width="76" x="10" y="12" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="360" y="803" id="icon3">
<e:Group x="442" y="845.5" 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:BitmapLabel width="76" x="10" y="12" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="513" y="841" id="icon4">
<e:Group x="238.01" y="939.19" 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:BitmapLabel width="76" x="10" y="12" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="440" y="975" id="icon5">
<e:Group x="180" y="1092" 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:BitmapLabel width="76" x="10" y="12" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="1089.69" id="icon6">
<e:Group x="382.01" y="1194.69" 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:BitmapLabel width="76" x="10" y="12" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -35,7 +35,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="numsgroup" x="393.38" y="373.38">
<e:Group id="numsgroup" x="407.38" y="365.38" scaleX="1.5" scaleY="1.5">
<e:Image id="numsbg0" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="tips" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
......
......@@ -8,7 +8,7 @@
<e:Image id="img2" horizontalCenter="0" y="515.76" source="{data.url2}" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Image id="money" y="516.2" scaleX="0.6" scaleY="0.6" source="common_money_png" x="150" visible="false"/>
<e:Image id="blood" y="518.8" horizontalCenter="1.5" source="common_blood_png" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="518.4" visible="false">
<e:Group id="numsgroup" x="410.38" y="513.4" scaleX="1.5" scaleY="1.5" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RedBombAlertSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group id="group" x="133" y="417">
<e:Group id="group" y="470" horizontalCenter="0">
<e:Image source="redbombalert文案_png" y="0" x="86"/>
<e:Label id="tips" text="今日还有2个红包在其他关卡等你哦~" y="79" textColor="0xffe9c0" x="0"/>
</e:Group>
<e:Group id="btn" y="865" horizontalCenter="0" visible="false">
<e:Image source="redAlert_btn_png" y="0" x="0"/>
<e:Label id="btnLabel" text="愉快收下" y="30" size="38" stroke="2" strokeColor="0x2f7df9" fontFamily="FZY3JW" x="103"/>
</e:Group>
<e:Group id="numsgroup" x="410" y="275" scaleX="1.5" scaleY="1.5" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RedBombTipsSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="814" horizontalCenter="0"/>
<e:Group id="btn" y="693.31" horizontalCenter="0">
<e:Image source="redbagtips按钮_png" y="0" x="0"/>
<e:Label text="找铃铛" verticalCenter="-10" horizontalCenter="0" size="38" strokeColor="0x0389ff" stroke="2" fontFamily="FZY3JW"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -8,12 +8,8 @@
<e:Image id="ele4" source="redbagtips_ele_png" x="134" y="490"/>
<e:Image id="redbag" source="redbagtips_ele7_png" y="432" x="376" anchorOffsetX="192" anchorOffsetY="108"/>
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="814" horizontalCenter="0.5"/>
<e:Button id="btn" label="" y="692" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="redbagtips按钮_png" source.down="redbagtips按钮_png" source.disabled="redbagtips按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="btn" y="693.31" horizontalCenter="0">
<e:Image source="redbagtips按钮_png" y="0" x="0"/>
<e:Label text="找红包" verticalCenter="-10" horizontalCenter="0" size="38" strokeColor="0x0389FF" stroke="2" fontFamily="FZY3JW"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<e:Image id="money" y="366.4" horizontalCenter="0.5" scaleX="0.7" scaleY="0.7" source="signprize元宝_png" visible="false"/>
<e:Label id="propnums2" text="30" textColor="0x885037" bold="true" y="525.64" width="75" textAlign="right" x="282.6" fontFamily="FZY3JW" visible="false"/>
<e:Image id="blood" y="368.16" horizontalCenter="0" source="common_blood_png" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="367.12">
<e:Group id="numsgroup" x="396.38" y="367.12" scaleX="1.5" scaleY="1.5">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="nums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/>
</e:Group>
......
......@@ -9,7 +9,7 @@
<e:Image id="img" width="508" height="225" source="{data.url}" horizontalCenter="0" y="337.76"/>
<e:Image id="money" source="signprize元宝_png" y="336.2" horizontalCenter="0" scaleX="0.8" scaleY="0.8" visible="false"/>
<e:Image id="blood" source="singprize体力_png" y="298.8" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="344.4" visible="false">
<e:Group id="numsgroup" x="407.38" y="326.4" scaleX="1.5" scaleY="1.5" locked="true" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,7 +8,7 @@ import MapRpeatPart from "./MapRpeatPart";
import { getRepeatCount } from "../startScene/StartScene";
export default class MapBottomPart extends ComponentBase {
static LEVEL_NUMS = 11;
static LEVEL_NUMS = 7;
getTxt(i): eui.BitmapLabel { return this[`txt${i}`]; }
start({repeatHeight,topHeight}) {
super.start();
......@@ -25,9 +25,8 @@ export default class MapBottomPart extends ComponentBase {
this.getIcon(i).addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
showToast('敬请期待更多关卡~');
}, this);
}
const icon = MapScene.iconHash[levelOrder] = this.getIcon(i);
this.removeChild(icon);
icon.show = ()=>{this.addChild(icon)};
......@@ -35,7 +34,7 @@ export default class MapBottomPart extends ComponentBase {
icon['nums'] = icon.getChildAt(0);
icon['bmptxt']=icon.getChildAt(1);
icon['mappart']=this;
const star = new MapStarComp();
star.loadSkin(); star.start();
MapScene.starHash[levelOrder] = star;
......
......@@ -2,7 +2,8 @@ import ComponentBase from "../../libs/new_wx/components/ComponentBase";
import MapTopPart from "./MapTopPart";
import MapScene from "./MapScene";
import MapStarComp from "./MapStarComp";
import { createData } from "../startScene/StartScene";
import setGray from "../setGray";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
export default class MapRpeatPart extends ComponentBase {
static LEVEL_NUMS = 13;
......@@ -19,8 +20,16 @@ export default class MapRpeatPart extends ComponentBase {
for (let i = 0; i < MapRpeatPart.LEVEL_NUMS; i++) {
const levelOrder = MapTopPart.LEVEL_NUMS + this._index * MapRpeatPart.LEVEL_NUMS + i + 1;
this.getTxt(i).text = levelOrder + '';
/// TODO 如果是在Repeat页的关卡超过了最大关卡,也要加点击toast
if ( levelOrder > window['last_level']) {
setGray(this.getIcon(i));
this.getIcon(i).addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
showToast('敬请期待更多关卡~');
}, this);
}
const icon = MapScene.iconHash[levelOrder] = this.getIcon(i);
this.removeChild(icon);
icon.show = ()=>{this.addChild(icon)};
......@@ -37,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}`]; }
......
......@@ -25,12 +25,12 @@ import TurntableIcon from "./icon/TurntableIcon";
import MapBottomPart from "./MapBottomPart";
import MapRpeatPart from "./MapRpeatPart";
import MapTopPart from "./MapTopPart";
import createRegTriangle from "../playScene/factory/createRegTriangle";
import RedBagAni, { createRedBagIcon } from "./RedBagAni";
import { createEffect2MovieClip } from "../effect/createEffect2";
import ActIcon from "./icon/ActIcon";
import { NetName } from "../../libs/tw/enum/NetName";
import TaskCenterIcon from "./icon/TaskCenterIcon";
import HbBombIcon from "./icon/HbBombIcon";
let doHelpFlag = false;
// let doScratchHelpFlag = false;
......@@ -117,6 +117,7 @@ export default class MapScene extends Scene {
function hbRainBaseInfo() {
return new Promise((resolve, reject) => NetManager.ins.hbRainBaseInfo(() => resolve()));
}
function getTaskInfo() {
return new Promise((resolve, reject) => NetManager.ins.getTaskInfo(() => resolve()));
}
......@@ -127,17 +128,21 @@ export default class MapScene extends Scene {
]);
}
hcRedBoobBaseInfo() {
return new Promise((r) => {
NetManager.ins.hc_redBombBaseInfo(async () => {
r();
});
});
}
async start(data?) {
super.start();
// PanelCtrl.instance.show('RedBombAlert');
// NetManager.ins.hc_submit(()=>{
// // const submitData = DataManager.ins.getData('hc_submit').data;
// // PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL,{ level:1, option: submitData.option })
// },1,1,'','')
this.addIcon(); // 添加Icon
this.sendInvite();
this.hcRedBoobBaseInfo();
this.updateMyInfo();
this.updateAdData();
......@@ -203,15 +208,19 @@ export default class MapScene extends Scene {
}
// 任务中心可领奖强提示
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){
panels.push('task');
break;
let canShow = localStorage.getItem('taskCenter' + window['CFG'].consumerId);
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) {
panels.push('task');
break;
}
}
}
}
localStorage.setItem('taskCenter' + window['CFG'].consumerId, 'false');
if(!readCache() && getHomeData().levels.length <= 0) { //引导
const guide = new GuideCon(() => {
......@@ -389,8 +398,10 @@ export default class MapScene extends Scene {
"taskCenterIcon": new TaskCenterIcon("taskCenterIcon", this["taskGroup"], this["taskBtn"], this["taskTipsBg"], this["taskTips"]),
};
this.actIcon = new ActIcon(this['actsShowBtn'], this['actTips'], this['actIconsGroup']);
this.actIcon = new ActIcon(this['actsShowBtn'], this['actTips'], this['actIconsGroup'], this);
this.actIcon.addActIcon("hbRainIcon", new HbRainIcon("hbRainIcon", this["hbRainGroup"], this["hbRainBtn"]));
this.actIcon.addActIcon('hbBombIcon', new HbBombIcon('hbBombIcon', this['act2Group'], this['act2Btn']));
this.actIcon.setGroup(); // 整理图标
}
private removeIcon() {
......@@ -642,7 +653,7 @@ export default class MapScene extends Scene {
}
onTap_act2btn() {
PanelCtrl.instance.show("BombTipsPanel");
PanelCtrl.instance.show("BombTips2Panel");
GDispatcher.dispatchEvent('closeActBtn');
}
......@@ -842,6 +853,7 @@ export default class MapScene extends Scene {
sec: Utils.prefixInteger(sec, 2)
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
onTap_friendBtn() {
......@@ -858,7 +870,7 @@ export default class MapScene extends Scene {
}, window['signActivityId'])
}
onTap_goldBtn(){
onTap_goldBtn() {
NetManager.ins.clickLog(getlogItem(67));
PanelCtrl.instance.show('recharge');
}
......@@ -866,7 +878,7 @@ export default class MapScene extends Scene {
protected initEvents() {
this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this);
this['guide'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_guide, this);
this['act2Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_act2btn, this);
// this['act2Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_act2btn, this);
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_inviteBtn, this);
this['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this);
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this);
......@@ -1087,8 +1099,10 @@ export default class MapScene extends Scene {
pic['__icon__'].addChildAt(light, 0);
egret.Tween.get(light).to({scaleX: 1.5, scaleY: 1.5,}, 200).call(() => {
pic['__icon__'].removeChild(light);
if(index == pics.length - 1){
showToast('铃铛隐藏在任意关卡中,快去找他们吧~');
}
});
});
});
})
......
......@@ -26,7 +26,7 @@ export default class RedBagAni {
}
export const createRedBagIcon = (parent)=>{
const icon = RES.getRes('mapredbagicom_png');
const icon = RES.getRes('mapredbagicom2_png');
const bmp = new egret.Bitmap(icon);
bmp.anchorOffsetX=32;
bmp.anchorOffsetY=33;
......
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import IconBase from "./IconBase";
let posArr = [
{x: 5, y: 158},
{x: 157, y: 158}
];
export default class ActIcon {
private actsShowBtn;
......@@ -9,10 +14,13 @@ export default class ActIcon {
private icons = {};
constructor(actsShowBtn, actTips, actIconGroup) {
parent;
constructor(actsShowBtn, actTips, actIconGroup, parent) {
this.actsShowBtn = actsShowBtn;
this.actTips = actTips;
this.actIconsGroup = actIconGroup;
this.parent = parent;
this.initUI();
this.initEvents();
}
......@@ -43,12 +51,31 @@ export default class ActIcon {
for(let k in this.icons) {
if(this.icons[k].visible) {
this.visible = true;
this.setGroup();
return;
}
}
this.visible = false;
}
public setGroup() {
let iconArr = [];
for(let k in this.icons) {
if(this.icons[k].visible) {
iconArr.push(this.icons[k]);
}
}
for(let i = 0; i < iconArr.length; i++) {
iconArr[i].x = posArr[i].x;
iconArr[i].y = posArr[i].y;
}
for(let i = 1; i <= 10; i++) { /// TODO when > 10 ??
this.parent[`actIconsBg${i}`] && (this.parent[`actIconsBg${i}`].visible = (i == iconArr.length));
}
}
public set visible(visible: boolean) {
this.actsShowBtn.visible = visible;
this.actTips.visible = visible;
......@@ -60,9 +87,9 @@ export default class ActIcon {
private onTap_actsShowBtn() {
this.actIconsGroup.visible = !this.actIconsGroup.visible;
if(this.actIconsGroup.visible){
for(let k in this.icons){
if(this.icons[k].visible){
if(this.actIconsGroup.visible) {
for(let k in this.icons) {
if(this.icons[k].visible) {
this.icons[k].showLog();
}
}
......
import IconBase from "./IconBase";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getlogItem } from "../../Main";
import CutTimer from "../../CutTimer";
import { DataManager } from "../../../libs/tw/manager/DataManager";
export default class HbBombIcon extends IconBase {
private cutTimer: CutTimer = null;
constructor(name: string, group: eui.Group, btn: eui.Button | eui.Image, tipsBg?: eui.Image, tipsLabel?: eui.Label) {
super(name, group, btn, tipsBg, tipsLabel);
this.setIcon();
}
private setIcon() {
let res = DataManager.ins.getData('hc_redBombBaseInfo');
if(res.success) {
this.visible = true;
NetManager.ins.showLog(getlogItem(77));
} else {
this.visible = false;
}
}
/**
* 点击icon
* @param e 点击事件
*/
protected onTouchBtn(e: egret.TouchEvent) {
super.onTouchBtn(e);
NetManager.ins.clickLog(getlogItem(77));
PanelCtrl.instance.show('BombTips2Panel');
GDispatcher.dispatchEvent('closeActBtn');
}
protected initEvents() {
super.initEvents();
}
protected removeEvents() {
super.removeEvents();
}
public destory() {
super.destory();
this.cutTimer.stop();
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
export default class IconBase {
protected iconGroup: eui.Group;
protected iconBtn: eui.Button;
protected iconBtn: eui.Button | eui.Image;
protected iconTipsBg: eui.Image;
protected iconTips: eui.Label;
......@@ -16,7 +16,7 @@ export default class IconBase {
return this._name;
}
constructor(name: string, group: eui.Group, btn: eui.Button, tipsBg?: eui.Image, tipsLabel?: eui.Label) {
constructor(name: string, group: eui.Group, btn: eui.Button | eui.Image, tipsBg?: eui.Image, tipsLabel?: eui.Label) {
this.iconGroup = group;
this.iconBtn = btn;
this.iconTipsBg = tipsBg;
......
......@@ -2,7 +2,6 @@ import IconBase from "./IconBase";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { getLadderGap } from "../../playScene/utils";
import { getlogItem } from "../../Main";
export default class TaskCenterIcon extends IconBase {
......
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { createEffect1MovieClip } from "../effect/createEffect1";
import RedBombRule from "./RedBombRule";
import { loadSvga } from "../loadSvga";
import getResPath from "../../libs/new_tc/getResPath";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
export default class BombTips2Panel extends Panel {
mv;
async start(data) {
super.start();
this.showlog();
loadSvga(getResPath() + 'resource/assets/svgas/redBombTip.svga').then(
(mv: egret.DisplayObject) => {
mv.y = -190;
this.addChildAt(mv, 1);
this.mv = mv;
mv.addEventListener(egret.Event.COMPLETE, () => {
// @ts-ignore
mv.gotoAndPlay(45, true);
}, this);
}
);
this.touchChildren = this.touchEnabled = false;
await RES.getResAsync('effect1_json');
await RES.getResAsync('effect2_json');
this.touchChildren = this.touchEnabled = true;
}
showlog() {
NetManager.ins.showLog(getlogItem(74));
}
initEvents() {
super.initEvents();
this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
this['rulebtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite2, this);
}
onTapInvite2() {
const rule = new RedBombRule();
rule.loadSkin();
rule.start();
this.addChild(rule);
}
onTapInvite() {
this['btn'].touchEnabled = false;
NetManager.ins.clickLog(getlogItem(74));
const dur = 100;
egret.Tween.get(this.mv).to({alpha: 0}, dur);
egret.Tween.get(this['btn']).to({alpha: 0}, dur);
egret.Tween.get(this['rulebtn']).to({alpha: 0}, dur);
const mask = PanelCtrl.instance._mask;
egret.Tween.get(mask).to({alpha: 0}, dur);
setTimeout(() => {
const mc = createEffect1MovieClip();
this.addChild(mc);
}, 200);
setTimeout(() => {
SceneCtrl.instance.currentScene['showRedBagAni']();
}, 400);
setTimeout(() => {
this.hidePanel();
}, 1000);
}
protected get closeBtns(): eui.Button[] {
return [this['closeBtn']]
}
get skinKey() {
return 'RedBombTips2'
}
}
\ No newline at end of file
......@@ -3,6 +3,8 @@ import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { createEffect1MovieClip } from "../effect/createEffect1";
import RedBombRule from "./RedBombRule";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
export default class BombTipsPanel extends Panel {
async start(data) {
......@@ -29,6 +31,7 @@ export default class BombTipsPanel extends Panel {
}
showlog() {
NetManager.ins.showLog(getlogItem(74));
}
initEvents() {
......@@ -46,6 +49,7 @@ export default class BombTipsPanel extends Panel {
onTapInvite() {
this['btn'].touchEnabled=false;
NetManager.ins.clickLog(getlogItem(74));
const eles = ['btn', 'rulebtn', 'bg', 'ele1', 'ele2', 'ele3', 'ele4', 'light'];
const dur = 100;
eles.forEach((e, index) => {
......
......@@ -50,9 +50,9 @@ export default class Buy1Panel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
} else {
if(res.code == '444444'){
if(res.code == '444444') {
showToast('操作太频繁,请稍后重试');
}else {
} else {
PanelCtrl.instance.show('shopTip', this.data);
}
}
......
......@@ -3,29 +3,40 @@ import Panel from "../../libs/new_wx/components/Panel";
import { getRedBombTimes } from "../getRedBombAward";
import { loadSvga } from "../loadSvga";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { getlogItem } from "../Main";
import { NetManager } from "../../libs/tw/manager/NetManager";
export default class RedBombAlertPanel extends Panel {
public group:eui.Group;
public tips:eui.Label;
public btn:eui.Group;
public btnLabel:eui.Label;
public numsgroup:eui.Group;
public numsbg:eui.Image;
public propnums:eui.Label;
async start(data) {
super.start();
this.showlog();
const times = getRedBombTimes();
const times = getRedBombTimes() - 1;
this['tips'].text = `今日还有${times}个红包在其他关卡等你哦~`;
if (times <= 0) {
if(times <= 0) {
this['tips'].text = `当日红包任务达成,明日再来~`;
}
this['group'].alpha = 0;
egret.Tween.get(this['group']).wait(1500).to({ alpha: 1 }, 300);
egret.Tween.get(this['group']).wait(1500).to({alpha: 1}, 300);
loadSvga(getResPath() + 'resource/assets/svgas/redbomb.svga').then(async (mv: any) => {
this.addChild(mv);
mv.y = -200;
mv.once(egret.Event.COMPLETE, () => {
mv.stop();
this.removeChild(mv);
//条件再修改,根据后端数据
const data = DataManager.ins.getData('hc_redBombAward').data;
if(data&&data.option){
if(data && data.option) {
this.playPrizeAni();
}else{
} else {
this.playNoPrizeAni();
}
}, this);
......@@ -34,45 +45,86 @@ export default class RedBombAlertPanel extends Panel {
playNoPrizeAni() {
loadSvga(getResPath() + 'resource/assets/svgas/redbomb_noprize.svga').then(async (mv: any) => {
mv.y = -200;
//去掉文案
egret.Tween.get(this['group']).to({alpha:0},300);
egret.Tween.get(this['group']).to({alpha: 0}, 300);
this.addChild(mv);
setTimeout(() => {
this.btn.visible = true;
this.btnLabel.text = '我知道了';
NetManager.ins.showLog(getlogItem(76));
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(76));
this.onTouchTap_closeBtn();
}, this);
}, 1000);
mv.once(egret.Event.COMPLETE, () => {
mv.stop();
this.once(egret.TouchEvent.TOUCH_TAP,()=>{this.hidePanel()},this);
this.once(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel()
}, this);
}, this);
});
}
playPrizeAni(){
playPrizeAni() {
loadSvga(getResPath() + 'resource/assets/svgas/redbomb_prize.svga').then(async (mv: any) => {
mv.y = -200;
//去掉文案
egret.Tween.get(this['group']).to({alpha:0},300);
this.addChild(mv);
egret.Tween.get(this['group']).to({alpha: 0}, 300);
this.addChildAt(mv, 1);
setTimeout(() => {
this.btn.visible = true;
this.btnLabel.text = '愉快收下';
NetManager.ins.showLog(getlogItem(75));
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(75));
this.onTouchTap_closeBtn();
}, this);
}, 1000);
mv.once(egret.Event.COMPLETE, () => {
mv.stop();
this.once(egret.TouchEvent.TOUCH_TAP,()=>{this.hidePanel()},this);
this.once(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel()
}, this);
}, this);
setTimeout(()=>{
mv.setImage("img_2349",DataManager.ins.getData('hc_redBombAward').data.option.img)
},100)
});
}
setTimeout(() => {
let option = DataManager.ins.getData('hc_redBombAward').data.option;
const {categoryType, num, propType, realValue} = option;// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
showlog() {
let isShow = true;
let img = option.img;
switch(categoryType) {
case 2:
this.propnums.text ='x'+ num;
img = 'alert_blood_png';
break;
case 3:
this.propnums.text ='x'+ num;
img = `alert_prop${propType}_png`;
break;
case 4:
this.propnums.text ='x'+ realValue;
img = 'alert_yb_png';
break;
default:
isShow = false;
option.img = img;
break;
}
setTimeout(()=>{
this.numsgroup.visible = isShow;
}, 1700);
mv.setImage("img_11871", img);
}, 100)
});
}
initEvents() {
super.initEvents();
// this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
protected get closeBtns(): eui.Button[] {
return [this['closeBtn']]
}
onTapInvite() {
get skinKey() {
return 'RedBombAlert'
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
get skinKey() { return 'RedBombAlert' }
}
\ No newline at end of file
......@@ -31,15 +31,12 @@ export default class RedBombRule extends Panel {
private addRule() {
const text =
`<br>1、用户每天邀请指定数量的新玩家参与闯关,可获得指定的现金券奖励。
2、用户发起邀请后,需在24小时内完成邀请任务;超过24小时,邀请任务失败,无法获得奖励,需重新发起邀请。
3、新用户仅包含未参与过狮狮连萌活动的用户。
4、用户不可为自己助力,或重复为好友助力。
5、完成邀请任务后,玩家可点击首页“邀请得现金券”图标领取现金券。
6、发放的奖励请在规定的有效时间内尽快领取或使用,逾期未领取或使用的会失效哦。
7、活动过程中,凡以不正当手段(包括但不限于作弊、恶意套现、扰乱系统、网络攻击等违规行为)参与本次活动的用户,苏宁易购有权终止其参加活动,并取消其获得奖励的资格。
8、极少数特殊情况下,若用户在完成活动的任务中被系统判定异常账户或风控账户,则可能导致奖励发放异常。
9、如遇不可抗力(包括但不限于重大自然灾害事件、活动受政府机关指令需要停止举办或调整的、活动遭受严重网络攻击不能正常进行的),苏宁易购有权取消、修改或暂停活动。`
`<br>1、活动期间,所有游戏关卡均有机会触发圣诞铃铛任务,但每个关卡最多只可触发1次。
2、进入游戏关卡且发现圣诞铃铛后,需先连续消除3次圣诞铃铛附近的元素才可开启任务。
3、任务开启后,在当前关卡规定的步数内,消除达到任务的目标数量即可获得圣诞奖励;未达到任务的目标数量,则无法获得圣诞奖励。
4、若在当前关卡规定的步数内,消除未达到圣诞铃铛任务的目标数量但已达到本局关卡的目标数量,用户仍可领取本局关卡的游戏奖励。
5、任务奖励每人每日最多可领取3次。
6、发放的奖励请在规定的有效时间内尽快领取或使用,逾期未领取或使用的会失效哦。`;
this.labContent.textFlow = (new HtmlTextParser).parser(text);
}
......
import { ChapterData } from "./interface/ChapterData";
import { Element } from "./class/Element";
import { Lattice } from "./class/Lattice";
import { ElementType, FiveBaseElementTypes } from "./enum/ElementType";
import { PassType } from "./enum/PassType";
import { EffectType } from "./enum/EffectType";
import { Pool } from "./Pool";
import { RecoverName } from "./enum/RecoverName";
......@@ -296,7 +294,8 @@ export class Tool {
if (this.judgeFall(lat) &&
!lat.element.hasState(StateType.HAIRBALLBLACK) &&
!lat.element.hasState(StateType.HAIRBALLGREY) &&
!lat.element.hasState(StateType.HAIRBALLBROWN)
!lat.element.hasState(StateType.HAIRBALLBROWN)&&
lat.element.type != ElementType.FESTIVALELE_SMALL
) {
return true
}
......
......@@ -4,19 +4,31 @@ import { RecoverName } from "../enum/RecoverName";
export class FesRedBombShowAni extends egret.DisplayObjectContainer {
// 红包
// constructor() {
// super()
// var textureDown: egret.Texture = RES.getRes("fesRedBombSta1_png");
// var down = new egret.Bitmap(textureDown);
// down.x = -textureDown.textureWidth / 2;
// down.y = -textureDown.textureHeight / 2;
// this.addChild(down);
// var textureUp: egret.Texture = RES.getRes("xingxingbi_png");
// var up = new egret.Bitmap(textureUp);
// up.x = -textureUp.textureWidth / 2; //-89
// up.y = -100;
// this.addChild(up);
// }
// 铃铛
constructor() {
super()
var textureDown: egret.Texture = RES.getRes("fesRedBombSta1_png")
var textureDown: egret.Texture = RES.getRes("fesRedBombSta2_png");
var down = new egret.Bitmap(textureDown);
down.x = -textureDown.textureWidth / 2;
down.y = -textureDown.textureHeight / 2;
this.addChild(down);
var textureUp: egret.Texture = RES.getRes("xingxingbi_png");
var up = new egret.Bitmap(textureUp);
up.x = -textureUp.textureWidth / 2; //-89
up.y = -100;
this.addChild(up);
}
play(position: number[], callback: Function) {
this.scaleX = this.scaleY = 0.29;
......
import { Pool } from "../Pool";
import { RecoverName } from "../enum/RecoverName";
import { Element } from "../class/Element";
import { Tool } from "../Tool";
import { ElementType } from "../enum/ElementType";
import { loadSvga } from "../../loadSvga";
export const stepPosition: number[] = [125, 115];
/**
* 需要回调的
* 手动修改this.shoot.rotation=
*/
export class FesRedShootAni2 extends egret.DisplayObjectContainer {
head;
efs: eui.Image[] = [];
fs:egret.Texture[] = [];
cur = 0;
ef:eui.Image;
tarr = [];
constructor() {
super();
let bStarTexture = RES.getRes("redBombBStar_png");
let yStarTexture = RES.getRes("redBombYStar_png");
let bSnowTexture = RES.getRes("redBombBSnow_png");
let textures = [bStarTexture, yStarTexture, bSnowTexture];
for(let i = 0; i <= 8; i++) {
this.tarr.push("线条尾部炸开_0000" + i + "_png");
}
this.tarr.forEach((v) => {
this.fs.push(RES.getRes(v));
});
this.cur = 0;
this.ef = new eui.Image(this.fs[0]);
this.ef.anchorOffsetX = 100;
this.ef.anchorOffsetY = 100;
this.addChild(this.ef);
this.ef.visible = false;
this.head = new eui.Image(bStarTexture);
this.head.scaleX = this.head.scaleY = 0.65;
this.head.anchorOffsetX = 35;
this.head.anchorOffsetY = 35;
this.addChild(this.head);
for(let i = 0; i < 8; i++) {
let nef = new eui.Image(textures[~~(Math.random() * 3)]);
nef.anchorOffsetX = 35;
nef.anchorOffsetY = 35;
this.addChild(nef);
this.efs.push(nef);
}
}
reset(startP: number[]) {
this.head.visible = true;
this.head.x = startP[0];
this.head.y = startP[1];
this.efs.forEach((v: eui.Image) => {
v.visible = true;
v.x = startP[0];
v.y = startP[1];
});
this.cur = 0;
this.ef.visible = true;
}
play(startP: number[], ele: Element, callback: Function) {
this.reset(startP);
let duration = 400;
let dis = Math.sqrt(
(startP[0] - ele.x) * (startP[0] - ele.x) + (startP[1] - ele.y) * (startP[1] - ele.y)
);
this.efs.forEach((v: eui.Image) => {
let r = -(Tool.getForwardRotation(startP, [ele.x, ele.y]) - 1.5707963 + (Math.random() * 0.6) - 0.3); // 算角度
v.scaleX = v.scaleY = Math.random() * 0.55 + 0.1; // 大小
let x = Math.sin(r) * (dis * (Math.random() * 0.8)) + startP[0]; // 算位置
let y = Math.cos(r) * (dis * (Math.random() * 0.8)) + startP[1];
egret.Tween.get(v).wait(100).to({x: x, y: y}, duration, egret.Ease.quadInOut);
egret.Tween.get(v).to({alpha: (Math.random() * 0.6 + 0.2)}, duration / 2)
.call(() => {
egret.Tween.get(v).to({alpha: 1}, duration / 2)
});
});
egret.Tween.get(this.head)
.to({x: ele.x, y: ele.y, rotation: 360}, duration)
.call(() => {
// 变换元素
ele.reset(ElementType.FESTIVALELE_SMALL);
ele.scaleX = ele.scaleY = 0.1;
egret.Tween.get(ele)
.to({scaleX: 1, scaleY: 1}, 500, egret.Ease.backOut);
this.ef.x = ele.x;
this.ef.y = ele.y;
this.ef.source = this.tarr[0];
let i = setInterval(() => {
this.cur++;
this.ef.source = this.tarr[this.cur];
if(this.cur == this.fs.length - 1) {
clearInterval(i);
this.ef.visible = false;
//回调
callback();
// 移除
if(this.$parent) {
this.$parent.removeChild(this)
}
// 回收
Pool.recover(RecoverName.FESREDSHOOT_ANI2, this);
}
}, 60);
setTimeout(() => {
this.efs.forEach((v: eui.Image) => {
v.visible = false;
});
this.head.visible = false;
}, 200)
});
}
}
class SAni extends egret.Bitmap {
sourceAll: string[];
currentFrame: number = 0;
totalFrames: number;
isPlay: boolean;
textures: egret.Texture[] = [];
counter: number;
frameInterval: number = 8;
constructor() {
super();
var arr = [];
for(var i = 0; i <= 8; i++) {
arr.push("线条尾部炸开_0000" + i + "_png");
}
this.anchorOffsetX = 100;
this.anchorOffsetY = 100;
this.sourceAll = arr;
this.texture = RES.getRes(this.sourceAll[0]);
this.sourceAll.forEach((v) => {
this.textures.push(RES.getRes(v));
});
this.totalFrames = arr.length;
console.log(this.textures);
}
play(start = 0) {
this.goto(start);
this.currentFrame = 0;
egret.startTick(this.onTick, this);
}
goto(frame: number) {
this.texture = this.textures[frame];
}
onTick() {
this.currentFrame++;
this.goto(this.currentFrame);
if(this.currentFrame == this.sourceAll.length - 1) {
this.stop();
this.dispatchEvent(new egret.Event(egret.Event.COMPLETE));
}
return false;
}
stop() {
this.currentFrame = 0;
egret.stopTick(this.onTick, this);
}
}
This diff is collapsed.
......@@ -101,8 +101,8 @@ class Status1 extends egret.DisplayObjectContainer {
egret.Tween.get(this.upImage)
.to({ scaleX: 1.8, scaleY: 1.8 }, 240)
.call(() => {
callback();
})
callback();
})
}
}
......@@ -286,11 +286,6 @@ class Status3 extends egret.DisplayObjectContainer {
.to({ x: 86 - offset, y: 60 - offset }, 100)
.wait(500);
})
}
play(callback: Function) {
......
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import MovieClip from "../../movieclip/MovieClip";
/**
* 节日元素
*
*/
export class FestivalEle2 extends egret.DisplayObjectContainer {
/**
* 是否要分裂了
*/
isActive: boolean;
/**
* 状态变化 2 1 0 再往后,可分裂
*/
private _statusNum: number;
get statusNum() {
return this._statusNum
}
set statusNum(value: number) {
if(value >= 0) {
//播放原来的动画
let child = this.$children[this._statusNum];
child["play"](() => {
//切换
this.toggleStatus(value);
})
this._statusNum = value;
} else {
//不用动画
this._statusNum = 0;
this.isActive = true;
}
}
constructor(n: number = 2) {
super();
var status3 = new Status3();
this.addChild(status3);
var status2 = new Status2();
this.addChild(status2);
var status1 = new Status1();
this.addChild(status1);
this.toggleStatus(n);
this.isActive = false;
this._statusNum = n;
}
reset(n: number = 2) {
this.toggleStatus(n);
this.isActive = false;
this._statusNum = n;
}
toggleStatus(index: number) {
for(var i = 0; i < this.$children.length; i++) {
var child = this.$children[i];
if(i == index) {
child.visible = true;
//重置状态
child["reset"]();
} else {
child.visible = false;
}
}
}
}
//第一种状态
class Status1 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛01.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
loadSvga(getResPath() + 'resource/assets/svgas/铃铛01变02.svga').then(
(mv: MovieClip) => {
mv.x = -60;
mv.y = -60;
this.addChild(mv);
mv.addEventListener(egret.Event.COMPLETE, () => {
this.removeChild(mv);
callback();
}, this);
}
);
}
}
//第二种状态
class Status2 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛02.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
callback();
}
}
class Status3 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛03.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
callback();
}
}
\ No newline at end of file
......@@ -27,9 +27,8 @@ export enum ElementType {
HAIRBALLBLACK,//黑色毛球12
//特殊元素 ,节日元素
FESTIVALELE_BIG, //节日元素大中间一个13
FESTIVALELE_SMALL //节日元素飞溅的小元素14
FESTIVALELE_BIG, //节日元素大中间一个13
FESTIVALELE_SMALL, //节日元素飞溅的小元素14
}
/**
......
......@@ -23,9 +23,10 @@ export enum RecoverName {
HAIRBALLBROWNDIVIDE_ANI = "HairballBrownDivideAni",
HAIRBALLJUMP_ANI = "HairballJumpAni", //三种毛球是一样的动画
FESREDBOMBSHOW_ANI = "FesRedBombShowAni",
FESREDBOMBSHOW2_ANI = 'FesRedBombShow2Ani',
FESREDSHOOT_ANI="FesRedShootAni",
FESREDSHOOT_ANI = "FesRedShootAni",
FESREDSHOOT_ANI2 = "FesRedShootAni",
//元素身上,特效常驻动效
......
......@@ -17,13 +17,16 @@ import { HairballBrownDivideAni } from "../anis/HairballBrownDivideAni";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getRotByTwoVectors } from "../anis/MagicRotateAni";
import { FesRedShootAni } from "../anisCall/FesRedShootAni";
import { FesRedShootAni2 } from "../anisCall/FesRedShootAni2";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
//孵鸡的数量
const chickenNum: number = 4;
//节日大红包的小红包数量
export const fesELeSmallNum: number = 6;
export const fesELeSmallNum: number = 4;
export class AiControl {
private static _ins: AiControl
......@@ -61,7 +64,7 @@ export class AiControl {
* 是否有毛球,
* 是否有变色气泡,
* 必须在初始化元素后执行,每关进入游戏都会初始化
* @param lattices
* @param lattices
*/
init(lattices: Lattice[]) {
this.hasJelly = judgeJellyExist(lattices);
......@@ -160,8 +163,10 @@ export class AiControl {
let endIndex = six[a];
let lat = thisObj.lattices[endIndex];
let ele = lat.element;
let fesRedShootAni: FesRedShootAni = Pool.takeOut(RecoverName.FESREDSHOOT_ANI)
if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni();
// let fesRedShootAni: FesRedShootAni = Pool.takeOut(RecoverName.FESREDSHOOT_ANI);
// if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni();
let fesRedShootAni: FesRedShootAni2 = Pool.takeOut(RecoverName.FESREDSHOOT_ANI2);
if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni2();
setTimeout(() => {
thisObj.addChild(fesRedShootAni);
fesRedShootAni.play(p, ele, () => {
......@@ -177,6 +182,21 @@ export class AiControl {
})
}, 100 * a)
}
loadSvga(getResPath() + 'resource/assets/svgas/雪花炸开效果.svga').then(
(mv:any)=>{
mv.stop();
setTimeout(()=>{
mv.gotoAndPlay(1, true);
mv.x = p[0] - 350;
mv.y = p[1] - 350;
thisObj.addChild(mv);
}, 100);
mv.addEventListener(egret.Event.COMPLETE, () => {
mv.stop();
thisObj.removeChild(mv);
}, this);
}
)
})
}
......@@ -256,8 +276,8 @@ export class AiControl {
/**
* 鸡蛋得孵化逻辑
* 与果冻不同,需要执行一次threeMatch,如无再执行callback,否则执行eleminate
* @param thisObj
* @param callback
* @param thisObj
* @param callback
*/
eggMotion(thisObj: MainScene, callback: Function) {
//无蛋,直接回调
......@@ -347,9 +367,9 @@ export class AiControl {
/**
* 变色气泡
*
* @param thisObj
* @param callback
*
* @param thisObj
* @param callback
*/
bubbleMotion(thisObj: MainScene, callback: Function) {
//无气泡,直接回调,气泡能生成,不能直接判断
......@@ -413,8 +433,8 @@ export class AiControl {
/**
* 跳动,以及褐色毛球的分裂
* 黑色毛球眩晕不执行跳动,不过结束后要重置为不眩晕状态,和callback同步执行
* @param thisObj
* @param callback
* @param thisObj
* @param callback
*/
hairballMotion(thisObj: MainScene, callback: Function) {
//没有毛球。直接回调
......@@ -606,7 +626,7 @@ export class AiControl {
/**
* 判断果冻是否存在
* @param lattices
* @param lattices
* @return false表示不存在,true表示存在
*/
function judgeJellyExist(lattices: Lattice[]) {
......@@ -620,7 +640,7 @@ function judgeJellyExist(lattices: Lattice[]) {
}
/**
* 判断毛球是否存在,甭管什么毛球
* @param lattices
* @param lattices
*/
function judgeHairballExist(lattices: Lattice[]) {
for (var i = 0; i < lattices.length; i++) {
......@@ -649,7 +669,7 @@ function judgeFesEleBigExist(lattices: Lattice[]) {
/**
* 判断气泡是否存在
* @param lattices
* @param lattices
*/
function judgeBubbleExist(lattices: Lattice[]) {
for (var i = 0; i < lattices.length; i++) {
......@@ -661,7 +681,7 @@ function judgeBubbleExist(lattices: Lattice[]) {
}
/**
* 获取所有鸡蛋的索引
* @param lattices
* @param lattices
* @return false表示不存在,true表示存在
*/
function getEggs(lattices: Lattice[]) {
......@@ -683,10 +703,10 @@ function getEggs(lattices: Lattice[]) {
* 判断可蔓延的方向,并返回蔓延终点的格子索引
* 判断可分裂的方向,并返回分裂终点的格子索引
* 判断可跳动的方向,并返回跳动终点的格子索引
*
*
* 4个方向随机,
* 得是基础元素,且无任何状态,可以有特效
* @param index
* @param index
* @return 没有返回null,注意判断时可能有0
*/
function judgeActionIndex(index: number, lattices: Lattice[]): number {
......
......@@ -139,5 +139,7 @@ export const createData = () => {
}
export const getRepeatCount = ()=>{
return (window['total_level'] - 18)/13;
/// TODO 14 = MapTopPart.LEVEL_NUMS + MapBottomPart.LEVEL_NUMS
/// TODO 13 = MapRpeatPart.LEVEL_NUMS
return (window['total_level'] - 14)/13;
}
\ No newline at end of file
{
"code":"0000000000",
"data":{
"option":{
"appItemId":2322,
"categoryType":1,
"coinType":1,
"img":"//yun.dui88.com/images/201910/e6pmpk2pne.png",
"maxValue":2,
"minValue":1,
"name":"测试商品",
"num":3,
"propType":2,
"rate":"概率",
"title":"商品信息",
"value":"虚拟商品标识符"
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1576659264135,
"data": {
"option": {
"id": "136",
"day": null,
"categoryType": 3,
"title": "虚拟商品",
"rate": "100",
"minValue": null,
"maxValue": null,
"coinType": null,
"realValue": 50,
"propType": 1,
"num": 10,
"img": "//yun.dui88.com/images/201912/5fyh67cjgh.jpeg",
"appItemId": 165699,
"name": "yqq测试03-虚拟商品",
"value": "1"
},
"orderNum":"1234232546",
"remainAwardTimes":1
},
"desc":"OK",
"success":true,
"timestamp":1572923678758
"orderNum": "1173279425966400135",
"remainAwardTimes": 2
}
}
\ No newline at end of file
{
"success": true,
"code": "0000000000",
"code": "600054",
"desc": "OK",
"timestamp": 1573210800000,
"data": {
......
......@@ -1136,7 +1136,7 @@
"remainProp": [
{
"type": 2,
"num": 0
"num": 2
},
{
"type": 3,
......
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