Commit aab7a7d9 authored by huangwenjie's avatar huangwenjie

9.16

parent 43c416bf
......@@ -21,6 +21,7 @@ module.exports = {
'/aww/*': 'http://localhost:3000',
'/activity_winner/*': 'http://localhost:3000',
'/signactivity/*': 'http://localhost:3000',
'/signpet/*': 'http://localhost:3000'
'/signpet/*': 'http://localhost:3000',
'/projectx/*': 'http://localhost:3000'
}
}
\ No newline at end of file
......@@ -53,6 +53,9 @@
<script src="libs/downloadApp.js"></script>
<script src="libs/svga.egret.min.js"></script>
<script>
window['projectxId'] = 1;
window['ruleTxt'] =
"1、活动内容:活动期间(2019 年 9 月 12 日 9: 00: 00 ~ 10 月 12 日 23: 59: 59),海底捞会员可登录海底捞APP参与【攒柴火吃火锅】签到活动,用户可通过,消耗 5 捞币兑换游戏锅底进行加热。每天完成任务(签到 / 消费等)可获取柴火,柴火可用于加热游戏锅底。100 柴火加热后,游戏锅底显示沸腾,沸腾收获的游戏锅底可用于兑换菜品券或参与菜品券抽奖。\n" +
"2、提供 4 种游戏锅底供用户选择,用户需消耗 5 捞币兑换一个游戏锅底;火锅沸腾需要消耗 100 柴火:每日可加热一个游戏锅底一次,每次消耗25柴火。柴火仅支持在本游戏进行累积使用,不支持转增、退回、找零、兑换其余海底捞等价产品。\n" +
......
......@@ -5,7 +5,7 @@
"name": "Preload"
},
{
"keys": "tomatoDemo_png,threeFreshDemo_png,spicyDemo_png,mushroomDemo_png,adoptTips_png,ruleTitle_png,closeBtn_png,buttonBg_png,harvest_tomatoPot_png,harvest_threefreshPot_png,harvest_spicyPot_png,harvest_mushroomPot_png",
"keys": "ruleTitle_png,closeBtn_png,buttonBg_png,harvest_tomatoPot_png,harvest_threefreshPot_png,harvest_spicyPot_png,harvest_mushroomPot_png,waitressLv1_svga",
"name": "Delay"
},
{
......@@ -13,7 +13,7 @@
"name": "Normal"
},
{
"keys": "levelBg_png,userIconBg_png,nicknameBg_png,coinNumBg_png,diamondNumBg_png,redPacketBtn_png,userImg_png,addSpeedTips_png,addSpeedBtn_png,addSpeedBg_png,circleBorder_png,decorateBtn_png,exchangeBtn_png,taskBtn_png,redPoint_png,qiangdanTipsBg_png,addCoinBtnBg_png,collectBtn_png,ovenLv1_png,ovenDesk_png,coffeeMakerLv1_png,coffeeMakerDesk_png,waitressLv1_png,qiangdanBtn_png,mainBg_jpg,table013_png,table003_png,table103_png,table113_png,table002_png,table112_png,table102_png,table012_png,table001_png,table111_png,table101_png,table011_png,barCounterLv1_png,barCounterLv2_png,barCounterLv3_png,vase_png,refrigeratorLv1_png,refrigeratorLv2_png,refrigeratorLv3_png,box_png,inviteBtn_png,levelUp_json,levelUp_png,coinAni_json,coinAni_png,coinLightAni_png,coinLightAni_json,createAni_png,createAni_json,payBtnBg_png",
"keys": "levelBg_png,userIconBg_png,nicknameBg_png,coinNumBg_png,diamondNumBg_png,redPacketBtn_png,userImg_png,addSpeedTips_png,addSpeedBtn_png,addSpeedBg_png,circleBorder_png,decorateBtn_png,exchangeBtn_png,taskBtn_png,redPoint_png,qiangdanTipsBg_png,addCoinBtnBg_png,collectBtn_png,ovenLv1_png,ovenDesk_png,coffeeMakerLv1_png,coffeeMakerDesk_png,waitressLv1_png,qiangdanBtn_png,mainBg_jpg,table013_png,table003_png,table103_png,table113_png,table002_png,table112_png,table102_png,table012_png,table001_png,table111_png,table101_png,table011_png,barCounterLv1_png,barCounterLv2_png,barCounterLv3_png,vase_png,refrigeratorLv1_png,refrigeratorLv2_png,refrigeratorLv3_png,box_png,inviteBtn_png,levelUp_json,levelUp_png,coinAni_json,coinAni_png,coinLightAni_png,coinLightAni_json,createAni_png,createAni_json,payBtnBg_png,openStoreBtn_png,bs_words0_png,bs_words1_png,bs_words2_png,logo_png,dog_png,bs_bg_jpg",
"name": "preload"
}
],
......@@ -163,31 +163,6 @@
"type": "image",
"name": "exchangeStoreBtn_png"
},
{
"url": "assets/adoptSoup/threeFreshDemo.png",
"type": "image",
"name": "threeFreshDemo_png"
},
{
"url": "assets/adoptSoup/mushroomDemo.png",
"type": "image",
"name": "mushroomDemo_png"
},
{
"url": "assets/adoptSoup/spicyDemo.png",
"type": "image",
"name": "spicyDemo_png"
},
{
"url": "assets/adoptSoup/tomatoDemo.png",
"type": "image",
"name": "tomatoDemo_png"
},
{
"url": "assets/adoptSoup/adoptTips.png",
"type": "image",
"name": "adoptTips_png"
},
{
"url": "assets/exchange/randomDrawBtn.png",
"type": "image",
......@@ -1159,94 +1134,134 @@
"name": "upshow_png"
},
{
"name": "paytitle_png",
"url": "assets/wdpop/pay/paytitle.png",
"type": "image",
"url": "assets/wdpop/pay/paytitle.png"
"name": "paytitle_png"
},
{
"name": "payBG_png",
"url": "assets/wdpop/pay/payBG.png",
"type": "image",
"url": "assets/wdpop/pay/payBG.png"
"name": "payBG_png"
},
{
"name": "gbfrige_png",
"url": "assets/wdpop/guidebuy/gbfrige.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbfrige.png"
"name": "gbfrige_png"
},
{
"name": "gbwait_png",
"url": "assets/wdpop/guidebuy/gbwait.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbwait.png"
"name": "gbwait_png"
},
{
"name": "gboven_png",
"url": "assets/wdpop/guidebuy/gboven.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gboven.png"
"name": "gboven_png"
},
{
"name": "gboven1_png",
"url": "assets/wdpop/guidebuy/gboven1.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gboven1.png"
"name": "gboven1_png"
},
{
"name": "gboven2_png",
"url": "assets/wdpop/guidebuy/gboven2.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gboven2.png"
"name": "gboven2_png"
},
{
"name": "gboven3_png",
"url": "assets/wdpop/guidebuy/gboven3.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gboven3.png"
"name": "gboven3_png"
},
{
"name": "gbfrige1_png",
"url": "assets/wdpop/guidebuy/gbfrige1.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbfrige1.png"
"name": "gbfrige1_png"
},
{
"name": "gbfrige2_png",
"url": "assets/wdpop/guidebuy/gbfrige2.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbfrige2.png"
"name": "gbfrige2_png"
},
{
"name": "gbfrige3_png",
"url": "assets/wdpop/guidebuy/gbfrige3.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbfrige3.png"
"name": "gbfrige3_png"
},
{
"name": "gbwait1_png",
"url": "assets/wdpop/guidebuy/gbwait1.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbwait1.png"
"name": "gbwait1_png"
},
{
"name": "gbwait2_png",
"url": "assets/wdpop/guidebuy/gbwait2.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbwait2.png"
"name": "gbwait2_png"
},
{
"name": "gbwait3_png",
"url": "assets/wdpop/guidebuy/gbwait3.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gbwait3.png"
"name": "gbwait3_png"
},
{
"name": "gblittle_png",
"url": "assets/wdpop/guidebuy/gblittle.png",
"type": "image",
"url": "assets/wdpop/guidebuy/gblittle.png"
"name": "gblittle_png"
},
{
"name": "gnstart_png",
"url": "assets/wdpop/guidenew/gnstart.png",
"type": "image",
"url": "assets/wdpop/guidenew/gnstart.png"
"name": "gnstart_png"
},
{
"name": "leavetext_png",
"url": "assets/wdpop/leave/leavetext.png",
"type": "image",
"url": "assets/wdpop/leave/leavetext.png"
"name": "leavetext_png"
},
{
"name": "payBtnBg_png",
"url": "assets/mainScene/payBtnBg.png",
"type": "image",
"url": "assets/mainScene/payBtnBg.png"
"name": "payBtnBg_png"
},
{
"url": "assets/beginScene/openStoreBtn.png",
"type": "image",
"name": "openStoreBtn_png"
},
{
"url": "assets/beginScene/bs_words0.png",
"type": "image",
"name": "bs_words0_png"
},
{
"url": "assets/beginScene/bs_words1.png",
"type": "image",
"name": "bs_words1_png"
},
{
"url": "assets/beginScene/bs_words2.png",
"type": "image",
"name": "bs_words2_png"
},
{
"url": "assets/beginScene/logo.png",
"type": "image",
"name": "logo_png"
},
{
"url": "assets/beginScene/dog.png",
"type": "image",
"name": "dog_png"
},
{
"url": "assets/beginScene/bs_bg.jpg",
"type": "image",
"name": "bs_bg_jpg"
},
{
"url": "assets/mainScene/waitressLv1.svga",
"type": "bin",
"name": "waitressLv1_svga"
}
]
}
\ No newline at end of file
......@@ -2,21 +2,15 @@
"skins": {},
"autoGenerateExmlsList": false,
"exmls": [
"resource/skins/AdoptSoupSkin.exml",
"resource/skins/ThermometerSkin.exml",
"resource/skins/WarningSkin.exml",
"resource/skins/LoginSkin.exml",
"resource/skins/MsgSkin.exml",
"resource/skins/NoPrizeSkin.exml",
"resource/skins/TaskItemSkin.exml",
"resource/skins/ExchangeItemSkin.exml",
"resource/skins/SoupBaseSkin.exml",
"resource/skins/MainSkin.exml",
"resource/skins/ConsumeSkin.exml",
"resource/skins/SoupSkin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/ExchangeTipSkin.exml",
"resource/skins/CollectPotSucSkin.exml",
"resource/skins/DailySignPrizeSkin.exml",
"resource/skins/FirstSignPrizeSkin.exml",
"resource/skins/FullSignPrizeSkin.exml",
......@@ -25,6 +19,7 @@
"resource/skins/ToastSkin.exml",
"resource/skins/VScrollBarSkin.exml",
"resource/skins/WaitingSkin.exml",
"resource/skins/BeginSkin.exml",
"resource/skins/pop/GuideBuySkin.exml",
"resource/skins/mainEle/AddSpeedSkin.exml",
"resource/skins/mainEle/CoinNumSkin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c41bff643"/>
<e:Image id="bg" source="msgBg_png" y="250.9" height="500" width="615" horizontalCenter="0.5"/>
<e:Image id="mushroom" source="mushroomDemo_png" x="436" y="327" anchorOffsetX="50"/>
<e:Image id="spicy" source="spicyDemo_png" x="314" y="327" anchorOffsetX="61.5"/>
<e:Image id="threeFresh" source="threeFreshDemo_png" x="556" y="327" anchorOffsetX="50"/>
<e:Image id="tomato" source="tomatoDemo_png" x="196" y="327" anchorOffsetX="50"/>
<e:Button id="closeBtn" label="" x="645.5" y="264.9" skinName="ui.IconButtonSkin" icon="closeBtn_png" anchorOffsetX="42.5" anchorOffsetY="41.83"/>
<e:Button id="sureBtn" label="" y="626.9" skinName="ui.IconButtonSkin" icon="sureBtn_png" width="434" height="122" anchorOffsetY="61" anchorOffsetX="217" x="375"/>
<e:Label id="costTxt" text="选择锅底需要消耗5捞币" x="193" y="499.22" anchorOffsetX="0" width="380.67" anchorOffsetY="0" height="38" verticalAlign="middle" textAlign="center" fontFamily="Microsoft YaHei"/>
<e:Image id="adoptTips" source="adoptTips_png" x="196" y="327" anchorOffsetX="50"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="bs_bg_jpg" x="0" y="0"/>
<e:Image id="dog" source="dog_png" x="447.66" y="999.33" anchorOffsetX="25.33" anchorOffsetY="69.33"/>
<e:Image source="logo_png" horizontalCenter="0" bottom="30"/>
<e:Button id="openStoreBtn" label="" y="1051.83" skinName="ui.IconButtonSkin" icon="openStoreBtn_png" width="493" height="118" anchorOffsetY="59" anchorOffsetX="246.5" horizontalCenter="0.5" alpha="0"/>
<e:Image id="words0" source="bs_words0_png" y="33" horizontalCenter="0" alpha="0"/>
<e:Image id="words1" source="bs_words1_png" y="33" horizontalCenter="0" alpha="0"/>
<e:Image id="words2" source="bs_words2_png" y="33.48" horizontalCenter="0.5" alpha="0"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c41bff643"/>
<e:Image id="bg" source="msgBg_png" y="250" height="500" width="615" horizontalCenter="0.5"/>
<e:Button id="sureBtn" label="" y="639.64" scaleX="1" scaleY="1" anchorOffsetY="60" anchorOffsetX="126.5" skinName="ui.IconButtonSkin" icon="msgSureBtn_png" height="132" width="255" x="374.5"/>
<e:Label id="title" text="成功收获1个锅底" x="125" y="279.7" anchorOffsetX="0" width="514" anchorOffsetY="0" height="88" verticalAlign="middle" textAlign="center" fontFamily="Microsoft YaHei" bold="true" borderColor="0x2660af" border="false" strokeColor="0x166499" stroke="3" size="40"/>
<e:Button id="closeBtn" label="" x="647.54" y="261.97" skinName="ui.IconButtonSkin" icon="closeBtn_png" anchorOffsetX="42.5" anchorOffsetY="41.83" scaleX="1" scaleY="1"/>
<e:Image id="prizeImg" source="spicyDemo_png" y="370" scaleX="1.4" scaleY="1.4" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c41bff643"/>
<e:Image id="bg" source="msgBg_png" y="250" height="500" width="615" horizontalCenter="0.5"/>
<e:Image id="mushroom" source="mushroomDemo_png" x="436" y="407" anchorOffsetX="50"/>
<e:Image id="spicy" source="spicyDemo_png" x="314" y="407" anchorOffsetX="61.5"/>
<e:Image id="threeFresh" source="threeFreshDemo_png" x="556" y="407" anchorOffsetX="50"/>
<e:Image id="tomato" source="tomatoDemo_png" x="196" y="407" anchorOffsetX="50"/>
<e:Button id="closeBtn" label="" x="650" y="260" skinName="ui.IconButtonSkin" icon="closeBtn_png" anchorOffsetX="42.5" anchorOffsetY="41.83"/>
<e:Button id="sureBtn" label="" y="631.9" skinName="ui.IconButtonSkin" icon="sureBtn_png" width="434" height="122" anchorOffsetY="61" anchorOffsetX="217" x="375"/>
<e:Image id="adoptTips" source="adoptTips_png" x="196" y="407" anchorOffsetX="50"/>
<e:Rect id="spicyMask" width="100" height="100" x="264" y="407" anchorOffsetX="0" anchorOffsetY="0" fillAlpha="0.9" fillColor="0x424242"/>
<e:Rect id="tomatoMask" width="100" height="100" x="146" y="407" anchorOffsetX="0" anchorOffsetY="0" fillAlpha="0.9" fillColor="0x424242"/>
<e:Rect id="mushroomMask" width="100" height="100" x="386.4" y="407" anchorOffsetX="0" anchorOffsetY="0" fillAlpha="0.9" fillColor="0x424242"/>
<e:Rect id="threefreshMask" width="100" height="100" x="506" y="407" anchorOffsetX="0" anchorOffsetY="0" fillAlpha="0.9" fillColor="0x424242"/>
<e:Image source="consumeTitle_png" y="323" x="182"/>
<e:Image source="soupNumBg3_png" x="210.5" y="394.5"/>
<e:Image source="soupNumBg3_png" x="330.8" y="394.5"/>
<e:Image source="soupNumBg3_png" x="451.9" y="394.5"/>
<e:Image source="soupNumBg3_png" x="571.5" y="394.5"/>
<e:Label id="tomatoNum" text="X0" x="215.5" y="397.5" anchorOffsetX="0" width="34" anchorOffsetY="0" height="27" fontFamily="Microsoft YaHei" size="14" verticalAlign="middle" textAlign="center"/>
<e:Label id="spicyNum" text="X0" x="336.3" y="397.5" anchorOffsetX="0" width="34" anchorOffsetY="0" height="27" fontFamily="Microsoft YaHei" size="14" verticalAlign="middle" textAlign="center"/>
<e:Label id="mushroomNum" text="X0" x="457.4" y="397.5" anchorOffsetX="0" width="34" anchorOffsetY="0" height="27" fontFamily="Microsoft YaHei" size="14" verticalAlign="middle" textAlign="center"/>
<e:Label id="threefreshNum" text="X0" x="577" y="397.5" anchorOffsetX="0" width="34" anchorOffsetY="0" height="27" fontFamily="Microsoft YaHei" size="14" verticalAlign="middle" textAlign="center"/>
</e:Skin>
\ No newline at end of file
......@@ -16,8 +16,9 @@
<e:ProgressBar id="loadingBar" width="200" height="10" y="716" skinName="ui.ProgressBarSkin" value="0" horizontalCenter="0"/>
<e:Image source="loadinggirl_png" horizontalCenter="0" verticalCenter="-174"/>
<e:ProgressBar id="loadingBar" width="500" height="84.98" skinName="ui.ProgressBarSkin" value="0" horizontalCenter="1.5" rotation="0.44" anchorOffsetX="0" anchorOffsetY="0" verticalCenter="-51.5"/>
<e:Image source="loadinggirl_png" horizontalCenter="0.5" verticalCenter="-169.5"/>
<e:Label text="Loading..." textColor="0x000000" fontFamily="Microsoft YaHei" verticalCenter="-9" horizontalCenter="0"/>
......
......@@ -3,14 +3,14 @@
<e:Image id="bg" source="mainBg_jpg" x="0" y="0"/>
<e:Image source="box_png" x="-4.5" y="409"/>
<e:Component id="diamondNum" width="145" height="45" skinName="DiamondNumSkin" anchorOffsetX="0" anchorOffsetY="0" left="180" top="122"/>
<e:Component id="diamondNum" width="145" height="45" skinName="DiamondNumSkin" anchorOffsetX="0" anchorOffsetY="0" left="180" top="123"/>
<e:Component id="coinNum" width="145" height="52" anchorOffsetX="0" anchorOffsetY="0" skinName="CoinNumSkin" left="30" top="120"/>
<e:Component id="coinNum0" width="293" height="68" anchorOffsetX="0" anchorOffsetY="0" skinName="NicknameSkin" left="30" top="30"/>
<e:Component id="nickName" width="293" height="68" anchorOffsetX="0" anchorOffsetY="0" skinName="NicknameSkin" left="30" top="30"/>
<e:Component id="payBtn" width="99" height="115" x="482" top="30" skinName="PayBtnSkin"/>
<e:Component id="addSpeedBtn" width="98" height="98" x="532" y="1002" skinName="AddSpeedSkin" anchorOffsetX="49" anchorOffsetY="49" visible="false"/>
<e:Component id="addSpeedBtn" width="98" height="98" x="532" skinName="AddSpeedSkin" anchorOffsetX="49" anchorOffsetY="49" bottom="155"/>
<e:Image source="addSpeedTips_png" x="435.5" y="876" visible="false"/>
<e:Image source="barCounterLv1_png" x="471.45" y="480" anchorOffsetX="282" anchorOffsetY="202" scaleX="0" scaleY="0"/>
<e:Image source="refrigeratorLv1_png" x="122.15" y="478.09" anchorOffsetX="65.15" anchorOffsetY="259.09" scaleX="0" scaleY="0"/>
<e:Image id="barCounter" source="barCounterLv1_png" x="471.45" y="480" anchorOffsetX="282" anchorOffsetY="202" scaleX="0" scaleY="0"/>
<e:Image id="refrigerator" source="refrigeratorLv1_png" x="122.15" y="478.09" anchorOffsetX="65.15" anchorOffsetY="259.09" scaleX="0" scaleY="0"/>
<e:Image id="vase" source="vase_png" x="178" y="380"/>
<e:Image id="table0" source="table001_png" y="653.27" anchorOffsetX="109.09" anchorOffsetY="184.85" x="149.09" scaleX="0" scaleY="0"/>
......@@ -30,7 +30,7 @@
<e:Image source="ovenDesk_png" x="8" y="109.00000000000011" scaleX="1" scaleY="1"/>
<e:Image id="oven" source="ovenLv1_png" x="34.50000000000006" y="37.000000000000114" scaleX="1" scaleY="1"/>
</e:Group>
<e:Component width="98" height="98" skinName="AddSpeedSkin" anchorOffsetX="49" anchorOffsetY="49" bottom="159" right="30"/>
<e:Rect width="750" height="140" x="0" anchorOffsetX="0" anchorOffsetY="0" fillAlpha="0.6" bottom="0"/>
<e:Scroller width="730" height="120" anchorOffsetX="0" bottom="10" scrollPolicyV="off" x="10">
<e:Group>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SoupBaseSkin" width="61" height="100" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="soupImg" source="sSoup0_png" y="0" horizontalCenter="0"/>
<e:Label id="soupCount" text="0/100" y="67" fontFamily="Microsoft YaHei" size="18" textColor="0x001E3D" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SoupSkin" width="290" height="290" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" >
<w:Config id="16c460e0b3d"/>
<e:Group id="soupGroup0" width="290" height="290" anchorOffsetX="145" anchorOffsetY="145" x="145" y="145" scaleX="0" scaleY="0" visible="false">
<e:Image id="soupBase0" scaleX="1" scaleY="1" width="266" height="257" anchorOffsetX="133" anchorOffsetY="128.5" x="145" y="145.5" source="mushroomSoupBase_png"/>
<e:Image id="mushroomEle0" source="mushroomEle0_png" x="72" y="198" anchorOffsetX="27" anchorOffsetY="24" scaleX="0" scaleY="0"/>
<e:Image id="mushroomEle1" source="mushroomEle1_png" x="233" y="99" anchorOffsetX="20" anchorOffsetY="19" scaleX="0" scaleY="0"/>
<e:Image id="mushroomEle2" source="mushroomEle2_png" x="170.5" y="60" anchorOffsetX="37" anchorOffsetY="28" scaleY="0" scaleX="0"/>
<e:Image id="mushroomEle3" source="mushroomEle3_png" x="89.5" y="97" anchorOffsetX="37" anchorOffsetY="57" scaleX="0" scaleY="0"/>
<e:Image id="mushroomEle4" source="mushroomEle4_png" x="167" y="178" anchorOffsetX="44" anchorOffsetY="53" scaleX="0" scaleY="0"/>
<e:Image id="mushroomEle5" source="mushroomEle5_png" x="220.5" y="240" anchorOffsetX="22" anchorOffsetY="16" scaleX="0" scaleY="0"/>
</e:Group>
<e:Group id="soupGroup1" width="290" height="290" anchorOffsetX="145" anchorOffsetY="145" x="145" y="145" scaleX="0" scaleY="0" visible="false">
<e:Image id="soupBase1" scaleX="1" scaleY="1" width="266" height="257" anchorOffsetX="133" anchorOffsetY="128.5" x="145" y="145.5" source="spicySoupBase_png"/>
<e:Image id="spicyEle0" source="spicyEle0_png" x="145" y="220" anchorOffsetX="40" anchorOffsetY="26" scaleX="0" scaleY="0"/>
<e:Image id="spicyEle1" source="spicyEle1_png" x="76.5" y="226.5" anchorOffsetX="24" anchorOffsetY="16" scaleX="0" scaleY="0"/>
<e:Image id="spicyEle2" source="spicyEle2_png" x="221" y="57" anchorOffsetX="19" anchorOffsetY="20" scaleX="0" scaleY="0"/>
<e:Image id="spicyEle3" source="spicyEle3_png" x="69" y="75" anchorOffsetX="33" anchorOffsetY="21" scaleX="0" scaleY="0"/>
<e:Image id="spicyEle4" source="spicyEle4_png" x="162.5" y="82" anchorOffsetX="29" anchorOffsetY="40" scaleX="0" scaleY="0"/>
<e:Image id="spicyEle5" source="spicyEle5_png" x="195.5" y="171" anchorOffsetX="26" anchorOffsetY="26" scaleX="0" scaleY="0"/>
<e:Image id="spicyEle6" source="spicyEle6_png" x="98" y="160" anchorOffsetX="62" anchorOffsetY="29" scaleX="0" scaleY="0"/>
<e:Image id="spicyEle7" source="spicyEle7_png" x="224.5" y="198" anchorOffsetX="40" anchorOffsetY="42" scaleX="0" scaleY="0"/>
</e:Group>
<e:Group id="soupGroup2" width="290" height="290" anchorOffsetX="145" anchorOffsetY="145" x="145" y="145" scaleX="0" scaleY="0" visible="false">
<e:Image id="soupBase2" scaleX="1" scaleY="1" width="266" height="257" anchorOffsetX="133" anchorOffsetY="128.5" x="144.5" y="145.5" source="threefreshSoupBase_png"/>
<e:Image id="threefreshEle0" source="threefreshEle0_png" x="160.5" y="195" anchorOffsetX="39" anchorOffsetY="29" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle1" source="threefreshEle1_png" x="65" y="122" anchorOffsetX="29" anchorOffsetY="20" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle10" source="threefreshEle10_png" x="112" y="157" anchorOffsetX="12" anchorOffsetY="6" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle11" source="threefreshEle11_png" x="216" y="75" anchorOffsetX="35" anchorOffsetY="33" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle12" source="threefreshEle12_png" x="207" y="138" anchorOffsetX="26" anchorOffsetY="25" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle2" source="threefreshEle2_png" x="138" y="68" anchorOffsetX="48" anchorOffsetY="34" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle3" source="threefreshEle3_png" x="49" y="56" anchorOffsetX="20" anchorOffsetY="25" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle4" source="threefreshEle4_png" x="231.5" y="219" anchorOffsetX="25" anchorOffsetY="14" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle5" source="threefreshEle5_png" x="62" y="214" anchorOffsetX="26" anchorOffsetY="31" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle6" source="threefreshEle6_png" x="239" y="178" anchorOffsetX="11" anchorOffsetY="3" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle7" source="threefreshEle7_png" x="74" y="63.5" anchorOffsetX="8" anchorOffsetY="7" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle8" source="threefreshEle8_png" x="244.5" y="50" anchorOffsetX="10" anchorOffsetY="5" scaleX="0" scaleY="0"/>
<e:Image id="threefreshEle9" source="threefreshEle9_png" x="195" y="104" anchorOffsetX="14" anchorOffsetY="6" scaleX="0" scaleY="0"/>
</e:Group>
<e:Group id="soupGroup3" height="290" anchorOffsetX="145" anchorOffsetY="145" x="145" y="145" scaleX="0" scaleY="0" width="289" visible="false">
<e:Image id="soupBase3" scaleX="1" scaleY="1" width="266" height="257" anchorOffsetX="133" anchorOffsetY="128.5" x="145" y="145.5" source="tomatoSoupBase_png"/>
<e:Image id="tomatoEle0" source="tomatoEle0_png" x="116" y="219" anchorOffsetX="40" anchorOffsetY="26" scaleX="0" scaleY="0"/>
<e:Image id="tomatoEle1" source="tomatoEle1_png" x="196" y="81.5" anchorOffsetX="51" anchorOffsetY="46" scaleX="0" scaleY="0"/>
<e:Image id="tomatoEle2" source="tomatoEle2_png" x="206" y="190" anchorOffsetX="40" anchorOffsetY="34" scaleX="0" scaleY="0"/>
<e:Image id="tomatoEle3" source="tomatoEle3_png" x="88" y="121" anchorOffsetX="58" anchorOffsetY="54" scaleX="0" scaleY="0"/>
</e:Group>
<e:Rect id="filter" width="290" height="290" x="0" y="0" anchorOffsetX="0" anchorOffsetY="0" fillAlpha="0.2" visible="false"/>
<e:ProgressBar id="Thermometer" y="211" skinName="ThermometerSkin" horizontalCenter="0" alpha="0"/>
<e:Image id="heatTips" source="heatTips_png" anchorOffsetX="55" anchorOffsetY="63" x="146" y="146" visible="false"/>
<e:Image id="collectTips" source="collectTips_png" width="108" height="125" anchorOffsetY="62.5" anchorOffsetX="54" x="145" y="145.5" visible="false"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ThermometerSkin" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" height="94">
<w:Config id="16c46de1c90"/>
<e:Image id="track" scale9Grid="16,13,2,2" anchorOffsetX="0" anchorOffsetY="0" y="2" source="track_png"/>
<e:Image id="thumb" x="29" y="27" source="thumb_png"/>
<e:Label id="temperatureTxt" text="0度" y="34" size="18" textColor="0xffffff" fontFamily="Microsoft YaHei" horizontalCenter="4.5"/>
<e:Rect width="55" height="2" x="70" anchorOffsetX="0" anchorOffsetY="0" fillColor="0xffffff" y="43"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ui.ProgressBarSkin" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" height="50">
<e:Image id="track" scale9Grid="16,13,2,2" width="200" height="6" anchorOffsetX="0" anchorOffsetY="0" y="2" source="loadingload_png"/>
<e:Image id="thumb" x="0" y="0" height="10" width="200" source="loadingline_png"/>
<e:Label id="progressNum" text="15%" y="23" size="16" horizontalCenter="0" textColor="0xefbf70"/>
<e:Image id="track" scale9Grid="16,13,2,2" width="500" height="39" anchorOffsetX="0" anchorOffsetY="0" y="2" source="loadingload_png"/>
<e:Image id="thumb" x="0" y="0" width="500" source="loadingline_png"/>
<e:Label id="progressNum" text="15%" y="23" size="16" horizontalCenter="0" textColor="0xefbf70" visible="false"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="CoinNumSkin" width="144.83" height="52" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="coinNumBg_png" x="-4.39" y="-5.59"/>
<e:Label id="CoinNumTxt" text="0" x="49.27" anchorOffsetX="0" width="86.83" verticalCenter="-0.41499999999999915" size="20" textAlign="center" verticalAlign="middle" fontFamily="Microsoft YaHei"/>
<e:Label id="coinNumTxt" text="0" x="49.27" anchorOffsetX="0" width="86.83" verticalCenter="0.5" size="20" textAlign="center" verticalAlign="middle" fontFamily="Microsoft YaHei" anchorOffsetY="0" height="42.5"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin width="180" height="57" xmlns:e="http://ns.egret.com/eui">
<e:Image source="addCoinBtnBg_png" x="0" y="0" scale9Grid="47,4,74,42" anchorOffsetX="0" width="180"/>
<e:Image source="collectBtn_png" right="5" y="9"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="DiamondNumSkin" width="145" height="45" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image x="-4.39" y="-5.59" source="diamondNumBg_png"/>
<e:Label id="CoinNumTxt" text="0" x="49.27" anchorOffsetX="0" width="86.83" verticalCenter="-0.41499999999999915" size="20" textAlign="center" verticalAlign="middle" fontFamily="Microsoft YaHei"/>
<e:Label id="diamondNumTxt" text="0" x="49.27" anchorOffsetX="0" width="86.83" verticalCenter="0" size="20" textAlign="center" verticalAlign="middle" fontFamily="Microsoft YaHei" anchorOffsetY="0" height="43.34"/>
</e:Skin>
\ No newline at end of file
......@@ -5,5 +5,5 @@
<e:Image source="userImg_png" x="0" y="0"/>
<e:Image source="levelBg_png" x="0" y="43.5"/>
<e:Label id="levelTxt" text="LV1" x="1" y="44" anchorOffsetX="0" width="54" anchorOffsetY="0" height="23.2" size="16" textAlign="center" verticalAlign="middle" fontFamily="Microsoft YaHei"/>
<e:Label id="usernametxt" text="usernameTxt" x="56" anchorOffsetX="0" width="221.2" textAlign="center" verticalCenter="0"/>
<e:Label id="usernametxt" text="小猫咪的咖啡馆" x="57" anchorOffsetX="0" width="221.2" textAlign="center" verticalCenter="-1" size="24" fontFamily="Microsoft YaHei"/>
</e:Skin>
\ No newline at end of file
......@@ -202,25 +202,28 @@ export default class GameConst {
}
/**
* 克隆物体
* @param fromObj 被克隆对象
* 数字转整数文字 如 100000 转为10万
* @param num 需要转化的数
* @param point 需要保留的小数位数
*/
public static cloneObject(fromObj: any): any {
// const co = cloneAll(fromObj);
// function cloneAll(obj) {
// function Clone() { }
// Clone.prototype = obj;
// const o = new Clone();
// for (const a in o) {
// if (typeof o[a] == "object") {
// o[a] = cloneAll(o[a]);
// }
// }
// return o;
// }
// return co;
}
public static tranNumber(num: number, point: number) {
let numStr = num.toString()
// 十万以内直接返回
if (numStr.length < 5) {
return numStr;
}
//大于8位数是亿
else if (numStr.length > 8) {
let decimal = numStr.substring(numStr.length - 8, numStr.length - 8 + point);
return parseFloat(Math.floor(num / 100000000) + '.' + decimal) + '亿';
}
//大于4位数是万
else if (numStr.length > 4) {
let decimal = numStr.substring(numStr.length - 4, numStr.length - 4 + point)
return parseFloat(Math.floor(num / 10000) + '.' + decimal) + '万';
}
}
// 二次贝塞尔,用于做曲线运动
public static bezier(t: number, p0: number, p1: number, p2: number) {
......
......@@ -31,6 +31,7 @@ import FullSignPrizePanel from './sign/FullSignPrizePanel';
import ExchangeTipPanel from './exchangeTip/ExchangeTipPanel';
import DecorationPanel from './decoration/DecorationPanel';
import LoadingScene from './loadingScene/LoadingScene';
import BeginScene from './beginScene/BeginScene';
class Main extends MainBase {
......@@ -53,6 +54,7 @@ class Main extends MainBase {
PanelCtrl.instance.registerClass(ModuleTypes.DECORATION_PANEL, DecorationPanel);
// 注册所有Scene
SceneCtrl.instance.registerClass(ModuleTypes.LOADING_SCENE, LoadingScene);
SceneCtrl.instance.registerClass(ModuleTypes.BEGIN_SCENE, BeginScene);
SceneCtrl.instance.registerClass(ModuleTypes.MAIN_SCENE, MainScene);
// NetManager.ins.onNotSuccess = (msg) => {
// showAlertPanel(msg)
......@@ -64,7 +66,7 @@ class Main extends MainBase {
protected async getData() {
super.getData();
//加载svga
let mv = await SVGACtrl.instance.load("waitressLv1", "http://yun.duiba.com.cn/db_games/activity/garbageSorting1.00/guideTips.svga");
let mv = await SVGACtrl.instance.load("waitressLv1", "./resource/assets/mainScene/waitressLv1.svga");
// let soundArr = ["numCountDown_mp3", "rightTips_mp3"]
// preloadSound(soundArr);
......
......@@ -2,6 +2,292 @@
import { NetManager } from './../libs/tw/manager/NetManager';
import { DataManager } from './../libs/tw/manager/DataManager';
import { INetData } from './../libs/tc/interface/INetData';
/**
* 微店定制接口
*/
export class weidianNet {
/**
* 1.1首页接口
* @param callback 回调
*/
public static index(callback, projectxId: number) {
const net: INetData = {
name: 'index',
uri: `/projectx/${projectxId}/join_1/index.do`,
type: 'get',
dataType: 'json',
hideMsg: true,
param: {
},
callback: callback
};
NetManager.ins.send(net);
}
/**
* 1.2创建店铺
* @param callback 回调
* @param shareCode 分享码
*/
public static openStore(callback, projectxId: number, shareCode?) {
let param: any = {}
if (shareCode) {
param.shareCode = shareCode
}
const net: INetData = {
name: 'openStore',
uri: `/projectx/${projectxId}/join_1/openStore.do`,
type: 'get',
dataType: 'json',
hideMsg: true,
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 1.3获取店铺装修设备列表
* @param callback 回调
*/
public static getEquipments(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'getEquipments',
uri: `/projectx/${projectxId}/join_1/getEquipments.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 1.4购买升级设备
* @param callback 回调
* @param type 类型
* @param level 等级
*/
public static upgrade(callback, projectxId: number, type, level) {
let param: any = {
type: type,
level: level
}
const net: INetData = {
name: 'upgrade',
uri: `/projectx/${projectxId}/join_1/upgrade.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 1.5收取设备产生的金币
* @param callback 回调函数
* @param type 设备类型
*/
public static receiveGold(callback, projectxId: number, type) {
let param: any = {
type: type
}
const net: INetData = {
name: 'receiveGold',
uri: `/projectx/${projectxId}/join_1/receiveGold.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.1查询任务信息
* @param callback 回调
*/
public static getTaskInfo(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'getTaskInfo',
uri: `/projectx/${projectxId}/p300c465d/join_1/a2edde463.do`,
type: 'get',
dataType: 'json',
hideMsg: true,
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.2签到打卡
* @param callback 回调
*/
public static doSign(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'doSign',
uri: `/projectx/${projectxId}/p300c465d/join_1/a761e0b35.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.3去分享
* @param callback 回调
*/
public static doShare(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'doShare',
uri: `/projectx/${projectxId}/p300c465d/join_1/a585254a2.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.4每日领金币
* @param callback 回调
*/
public static getCoin(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'doShare',
uri: `/projectx/${projectxId}/p300c465d/join_1/a24f13a7b.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.5下单领金币
* @param callback 回调
*/
public static getPurchaseCoin(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'getPurchaseCoin',
uri: `/projectx/${projectxId}/p300c465d/join_1/a6eca2e09.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.6浏览商品领金币
* @param callback 回调
*/
public static getSkimCoin(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'getSkimCoin',
uri: `/projectx/${projectxId}/p300c465d/join_1/a6f5ffd16.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.7、邀请好友下载领金币
* @param callback 回调
*/
public static getDownloadCoin(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'getDownloadCoin',
uri: `/projectx/${projectxId}/p300c465d/join_1/a50bc9dd7.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 2.8邀请好友开店领金币
* @param callback 回调
*/
public static getInviteCoin(callback, projectxId: number) {
let param: any = {}
const net: INetData = {
name: 'getInviteCoin',
uri: `/projectx/${projectxId}/p300c465d/join_1/a3357b556.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 3.1兑换
* @param callback 回调
* @param itemId 商品编号(1、2、3、4)
*/
public static exchange(callback, projectxId: number, itemId) {
let param: any = {
itemId: itemId
}
const net: INetData = {
name: 'exchange',
uri: `/projectx/${projectxId}/p300c465d/join_1/doJoin.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
/**
* 3.2查询兑换好礼列表
* @param callback 回调
*/
public static exchangeList(callback, projectxId: number) {
let param: any = {
}
const net: INetData = {
name: 'exchangeList',
uri: `/projectx/${projectxId}/p300c465d/join_1/list.do`,
type: 'get',
dataType: 'json',
param: param,
callback: callback
};
NetManager.ins.send(net);
}
}
/**
* 接口常量
*
......
......@@ -31,7 +31,7 @@ export default class Msg extends Panel {
}
}
if (this.data.type == 'reload') {
this.closeBtn1.visible = false;
this.closeBtn.visible = false;
this.reloadBtn.visible = true;
}
}
......
import { weidianNet } from './../NetConst';
import { ModuleTypes } from './../types/sceneTypes';
import Scene from "../views/Scene";
import SceneCtrl from "../ctrls/sceneCtrl";
import PanelCtrl from '../ctrls/panelCtrl';
export default class BeginScene extends Scene {
public get skinKey() { return "Begin" }
public dog: eui.Image;
public openStoreBtn: eui.Button;
public words0: eui.Image;
public words1: eui.Image;
public words2: eui.Image;
constructor() {
super();
this.initBuired();
this.initUI();
this.initAni();
}
initBuired() {
}
initUI() {
}
async initAni() {
this.dogAni();
await this.words0Ani();
this.hideWords0();
await this.words1Ani();
this.hideWords1();
await this.words2Ani();
this.hideWords2();
this.showBtn();
}
dogAni() {
egret.Tween.get(this.dog, { loop: true })
.to({ scaleY: 0.98 }, 500)
.to({ scaleY: 1 }, 500)
}
words0Ani() {
return new Promise(r => {
egret.Tween.get(this.words0)
.set({ alpha: 0, y: 80 })
.to({ alpha: 1, y: 30 }, 500)
.wait(1500)
.call(() => {
r();
})
})
}
hideWords0() {
egret.Tween.get(this.words0)
.to({ alpha: 0, y: 15 }, 300)
}
words1Ani() {
return new Promise(r => {
egret.Tween.get(this.words1)
.set({ alpha: 0, y: 80 })
.to({ alpha: 1, y: 30 }, 500)
.wait(1500)
.call(() => {
r();
})
})
}
hideWords1() {
egret.Tween.get(this.words1)
.to({ alpha: 0, y: 15 }, 300)
}
words2Ani() {
return new Promise(r => {
egret.Tween.get(this.words2)
.set({ alpha: 0, y: 80 })
.to({ alpha: 1, y: 30 }, 500)
.wait(1500)
.call(() => {
r();
})
})
}
hideWords2() {
egret.Tween.get(this.words2)
.to({ alpha: 0, y: 15 }, 300)
}
showBtn() {
egret.Tween.get(this.openStoreBtn)
.to({ alpha: 1 }, 300)
.call(() => {
egret.Tween.get(this.openStoreBtn, { loop: true })
.set({ scaleX: 1, scaleY: 1 })
.to({ scaleX: 0.95, scaleY: 1.05 }, 160)
.to({ scaleX: 1, scaleY: 1 }, 160)
.to({ scaleX: 0.95, scaleY: 1.05 }, 160)
.to({ scaleX: 1, scaleY: 1 }, 160)
.wait(600)
})
}
initEvents() {
super.initEvents();
this.onTap(this.openStoreBtn, this.onTap_openStoreBtn)
}
onTap_openStoreBtn() {
// 接口 第一次进
weidianNet.openStore((s) => {
if (!s) {
PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, { msg: "开店失败,请重试~", type: "tips" })
return
}
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, true)
}, window["projectxId"])
}
removeEvents() {
super.removeEvents();
this.clearTap(this.openStoreBtn, this.onTap_openStoreBtn)
}
}
\ No newline at end of file
......@@ -13,8 +13,8 @@ export default class SVGACtrl {
let parser = new window['SVGA'].Parser();
parser.load(path, (videoItem) => {
var mv = new window['SVGA'].EgretMovieClip(videoItem)
let data = { name: mv }
this.SVGAPool.push(data)
this.SVGAPool[name] = videoItem;
resolve();
let fun
mv.addEventListener(egret.Event.COMPLETE, fun = function () {
......
import { weidianNet } from './../NetConst';
import { DataManager } from './../../libs/tw/manager/DataManager';
import { NetManager } from './../../libs/tw/manager/NetManager';
import { Buried } from './../../libs/tw/util/Buried';
......@@ -8,6 +9,7 @@ import GameConst from '../GameConst';
// import BridgeFactory from "../../libs/JSBridge/bridge/BridgeFactory";
import ProgressBar from "./ProgressBar";
import PanelCtrl from '../ctrls/panelCtrl';
export default class LoadingScene extends Scene {
get skinKey() { return 'Loading' }
......@@ -110,11 +112,26 @@ export default class LoadingScene extends Scene {
//加载成功后操作
handleLoaded() {
// 判断是否新用户
if (false) {
SceneCtrl.instance.change(ModuleTypes.ADOPT_SCENE)
} else {
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE);
}
weidianNet.index((s) => {
if (!s) {
PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, { msg: "网络异常,\n请稍后刷新重试~", type: "reload" })
return
}
weidianNet.getTaskInfo((ss) => {
if (!ss) {
PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, { msg: "网络异常,\n请稍后刷新重试~", type: "reload" })
return
}
const { hasStore } = DataManager.ins.getData("index").data;
if (!hasStore) {
SceneCtrl.instance.change(ModuleTypes.BEGIN_SCENE)
} else {
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE);
}
}, window['projectxId'])
}, window['projectxId'])
}
......@@ -125,91 +142,3 @@ export default class LoadingScene extends Scene {
}
}
// NetManager.ins.getSignInfo(
// () => {
// console.log(DataManager.ins.signInfoData)
// if (DataManager.ins.signInfoData.signInfoVO.acmDay > 0) {
// // 已经打过卡,即已领养 传入参数注意确认
// GameConst.getAllPetsInfo(window['CFG'].activityId, () => {
// //查询当前宠物信息
// console.log(DataManager.ins.getData('getAllPetsInfo').data);
// let petId;
// let identifier;
// DataManager.ins.getData('getAllPetsInfo').data.forEach(pig => {
// if (pig.petLevel < 14) {
// petId = pig.petId;
// identifier = pig.identifier;
// }
// });
// if (petId) {
// GameConst.getPetInfo(petId, (success) => {
// if (success) {
// window['currentPigData'] = {
// "petId": petId,
// "identifier": identifier, //用来判断vip等级和猪的类型
// "vipLevel": DataManager.ins.getData('getPetInfo').data.vipLevel,
// "alredyReward": DataManager.ins.getData('getPetInfo').data.alredyReward,
// "loveValue": DataManager.ins.getData('getPetInfo').data.loveValue,
// "petLevel": DataManager.ins.getData('getPetInfo').data.petLevel,
// "usingToys": DataManager.ins.getData('getPetInfo').data.usingToys
// }
// SceneCtrl.instance.change(ModuleTypes.PLAY_SCENE);
// }
// })
// }
// })
// } else {
// // 未打过卡,即未领养宠物,让用户领养宠物
// SceneCtrl.instance.change(ModuleTypes.PIGTHEME_SCENE);
// }
// // SceneCtrl.instance.change(ModuleTypes.PIGTHEME_SCENE);
// }
// , window['signActivityId']
// );
// NetManager.ins.getSignInfo(
// () => {
// console.log(DataManager.ins.signInfoData)
// if (DataManager.ins.signInfoData.signInfoVO.acmDay > 0) {
// // 已经打过卡,即已领养 传入参数注意确认
// GameConst.getAllPetsInfo(window['CFG'].activityId, () => {
// //查询当前宠物信息
// console.log(DataManager.ins.getData('getAllPetsInfo').data)
// let petId;
// let identifier;
// DataManager.ins.getData('getAllPetsInfo').data.forEach(pig => {
// if (pig.petLevel < 14) {
// petId = pig.petId;
// identifier = pig.identifier;
// }
// });
// if (petId) {
// GameConst.getPetInfo(petId, (success) => {
// if (success) {
// window['currentPigData'] = {
// "petId": petId,
// "identifier": identifier, //用来判断vip等级和猪的类型
// "vipLevel": DataManager.ins.getData('getPetInfo').data.vipLevel,
// "alredyReward": DataManager.ins.getData('getPetInfo').data.alredyReward,
// "loveValue": DataManager.ins.getData('getPetInfo').data.loveValue,
// "petLevel": DataManager.ins.getData('getPetInfo').data.petLevel,
// "usingToys": DataManager.ins.getData('getPetInfo').data.usingToys
// }
// SceneCtrl.instance.change(ModuleTypes.PLAY_SCENE);
// }
// })
// }
// })
// } else {
// // 未打过卡,即未领养宠物,让用户领养宠物
// SceneCtrl.instance.change(ModuleTypes.PIGTHEME_SCENE);
// }
// // SceneCtrl.instance.change(ModuleTypes.PIGTHEME_SCENE);
// }
// , window['signActivityId']
// );
\ No newline at end of file
import { DataManager } from './../../libs/tw/manager/DataManager';
import Scene from "../views/Scene";
import Ani from "./Ani";
import PanelCtrl from "../ctrls/panelCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import GameConst from "../GameConst";
import SVGACtrl from '../ctrls/svgaCtrl';
export default class MainScene extends Scene {
......@@ -12,9 +14,11 @@ export default class MainScene extends Scene {
public bg: eui.Image;
public diamondNum: eui.Component;
public coinNum: eui.Component;
public coinNum0: eui.Component;
public nickName: eui.Component;
public payBtn: eui.Component;
public addSpeedBtn: eui.Component;
public barCounter: eui.Image;
public refrigerator: eui.Image;
public vase: eui.Image;
public table0: eui.Image;
public table1: eui.Image;
......@@ -31,19 +35,20 @@ export default class MainScene extends Scene {
public oven: eui.Image;
private mainConfig = {
"username": "",
"level": 0,
"storeLevel": 0,
"coin": 0,
"diamond": 0
}
constructor() {
constructor(data?) {
super();
this.percentHeight = 100;
this.percentWidth = 100;
this.firstVisit = data;
// 初始化UI
this.initUI()
// 初始化埋点
......@@ -54,8 +59,68 @@ export default class MainScene extends Scene {
this.initLogic();
}
initUI() {
const { goldCoin, diamond, storeLevel, nickName, storeUpgrade, hasUpgradeReward, upgradeReward, tableLevel, tableCapacity, ovenLevel,
ovenCapacity, freezerLevel, freezerCapacity, coffeeMakerLevel, coffeeMakerCapacity, checkstandLevel, checkstandCapacity,
waiterLevel, waiterCapacity, chickenNewEnable, chickenEnable, chickenCould, chickenDuring, chickenEndTime, chickenRemainTime,
feeNewEnbale, feeEnbale, feeNeedPay, feeNextPayTime, grabNewEnable, grabEnable, grabCould, grabNextTime } = DataManager.ins.getData("index").data;
this.nickName['usernametxt'].text = nickName + "的咖啡屋"
this.nickName['levelTxt'].text = "Lv" + storeLevel + ""
this.coinNum['coinNumTxt'].text = GameConst.tranNumber(Number(goldCoin + ""), 1);
this.diamondNum['diamondNumTxt'].text = GameConst.tranNumber(Number(diamond + ""), 1);
if (Number(tableLevel) > 0) {
for (let i = 0; i < 4; i++) {
this['table' + i].visible = true;
this['table' + i].scaleX = 1;
this['table' + i].scaleY = 1;
this['table' + i].source = `table10${tableLevel}_png`;
}
}
if (Number(ovenLevel) > 0) {
this.ovenGroup.visible = true;
this.ovenGroup.scaleX = 1;
this.ovenGroup.scaleY = 1;
this.oven.source = `ovenLv${ovenLevel}_png`
}
if (Number(freezerLevel) > 0) {
this.refrigerator.visible = true;
this.refrigerator.scaleX = 1;
this.refrigerator.scaleY = 1;
this.refrigerator.source = `refrigeratorLv${freezerLevel}_png`
}
if (Number(coffeeMakerLevel) > 0) {
this.coffeeMakerGroup.visible = true;
this.coffeeMakerGroup.scaleX = 1;
this.coffeeMakerGroup.scaleY = 1;
this.coffeeMaker.source = `coffeeMakerLv${coffeeMakerLevel}_png`
}
if (Number(checkstandLevel) > 0) {
this.barCounter.visible = true;
this.barCounter.scaleX = 1;
this.barCounter.scaleY = 1;
this.barCounter.source = `barCounterLv${checkstandLevel}_png`
}
if (waiterLevel > 0) {
for (let i = 0; i < 2; i++) {
let waitress = new window['SVGA'].EgretMovieClip(SVGACtrl.instance.SVGAPool["waitressLv1"]);
this.addChild(waitress)
}
}
}
updateMoney() {
let goldCoin, diamond;
this.coinNum['coinNumTxt'].text = GameConst.tranNumber(Number(goldCoin + ""), 1);
this.diamondNum['diamondNumTxt'].text = GameConst.tranNumber(Number(diamond + ""), 1);
}
initAni() {
......@@ -66,17 +131,16 @@ export default class MainScene extends Scene {
}
firstVisit;
initLogic() {
// 是否首次进入
let firstVisit = false
if (firstVisit) {
const { sign } = DataManager.ins.getData("getTaskInfo").data;
if (this.firstVisit) {
// 首次访问 首次开店弹窗 然后新手引导
} else {
// 非首次访问
// 是否签到
let todaySigned = false
if (todaySigned) {
if (sign) {
// 今日已经签过到 无操作
} else {
// 今日未签到 进行签到
......
......@@ -3,7 +3,7 @@ export enum ModuleTypes {
START_SCENE,
PLAY_SCENE,
OVER_SCENE,
ADOPT_SCENE,
BEGIN_SCENE,
MAIN_SCENE,
ALERT_PANEL,
......
const path = require('path');
const config = {
'/projectx/1/join_1/index.do': {
data: './weidian/index.json'
},
'/projectx/1/p300c465d/join_1/a2edde463.do': {
data: './weidian/getTaskInfo.json'
},
'/projectx/1/join_1/openStore.do': {
data: './weidian/openStore.json'
},
'/activityCommon/getRole': {
data: './json/getRole.json'
},
......
{
"data": {
"sign": true,
"takeCoinsTask": [{
"coins": 1000,
"currentProgress": 1,
"status": "success",
"targetProgress": 1,
"taskname": "每日领金币",
"taskurl": "http://spring.io"
}],
"shareTask": [{
"coins": 1000,
"currentProgress": 1,
"status": "success",
"targetProgress": 1,
"taskname": "每日分享",
"taskurl": "http://spring.io"
}],
"browseTask": [{
"coins": 1000,
"currentProgress": 1,
"status": "success",
"targetProgress": 1,
"taskname": "浏览微店",
"taskurl": "http://spring.io"
}],
"inviteTask": [{
"coins": 1000,
"currentProgress": 1,
"status": "success",
"targetProgress": 1,
"taskname": "邀请好友",
"taskurl": "http://spring.io"
}],
"dayInfos": [{
"exp": 1000,
"coins": 1000,
"diamonds": 0,
"sign": true
},
{
"exp": 1500,
"coins": 1000,
"diamonds": 0,
"sign": true
},
{
"exp": 2000,
"coins": 1000,
"diamonds": 0,
"sign": true
},
{
"exp": 2500,
"coins": 1000,
"diamonds": 0,
"sign": true
},
{
"exp": 0,
"coins": 1000,
"diamonds": 200,
"sign": true
}
]
},
"success": true
}
\ No newline at end of file
{
"success": true,
"data": {
"hasStore": true,
"goldCoin": 3232,
"diamond": 131,
"nickName": "用户昵称",
"storeLevel": 1,
"storeUpgrade": false,
"hasUpgradeReward": false,
"upgradeReward": 1,
"tableLevel": 1,
"tableCapacity": 2,
"ovenLevel": 1,
"ovenCapacity": 2,
"freezerLevel": 1,
"freezerCapacity": 2,
"coffeeMakerLevel": 1,
"coffeeMakerCapacity": 2,
"checkstandLevel": 1,
"checkstandCapacity": 2,
"waiterLevel": 1,
"waiterCapacity": 2,
"chickenNewEnable": false,
"chickenEnable": false,
"chickenCould": false,
"chickenDuring": false,
"chickenEndTime": 123224,
"chickenRemainTime": 5,
"feeNewEnbale": false,
"feeEnbale": false,
"feeNeedPay": false,
"feeNextPayTime": 132424,
"grabNewEnable": false,
"grabEnable": false,
"grabCould": false,
"grabNextTime": 23242
}
}
\ No newline at end of file
{
"success": true,
"data": {
"newStoreReward": 5000
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment