Commit 880ecfcb authored by 邱旭's avatar 邱旭

修改商店为兑换

parent 8b06d5e4
This diff is collapsed.
This diff is collapsed.
{ {
"skins": {}, "skins": {},
"autoGenerateExmlsList": true, "autoGenerateExmlsList": true,
"exmls": [ "exmls": [
"resource/skins/ExchangePanelSkin.exml", "resource/skins/ExchangePanelSkin.exml",
"resource/skins/ExchangedPanelSkin.exml", "resource/skins/ExchangedPanelSkin.exml",
"resource/skins/IntroducePanelSkin.exml", "resource/skins/IntroducePanelSkin.exml",
"resource/skins/LoadingSceneSkin.exml", "resource/skins/LoadingSceneSkin.exml",
"resource/skins/LoadingSkin.exml", "resource/skins/LoadingSkin.exml",
"resource/skins/MainSceneSkin.exml", "resource/skins/MainSceneSkin.exml",
"resource/skins/MainUISkin.exml", "resource/skins/MainUISkin.exml",
"resource/skins/MedalPanelSkin.exml", "resource/skins/MedalPanelSkin.exml",
"resource/skins/MedalsPanelSkin.exml", "resource/skins/MedalsPanelSkin.exml",
"resource/skins/NewUserPanelSkin.exml", "resource/skins/NewUserPanelSkin.exml",
"resource/skins/OldUserPanelSkin.exml", "resource/skins/OldUserPanelSkin.exml",
"resource/skins/RoomSceneSkin.exml", "resource/skins/RoomSceneSkin.exml",
"resource/skins/RulePanelSkin.exml", "resource/skins/RulePanelSkin.exml",
"resource/skins/SellPanelSkin.exml", "resource/skins/UnlockPanelSkin.exml",
"resource/skins/SellRecordItemSkin.exml", "resource/skins/GameGroupSkin.exml",
"resource/skins/SellRecordSkin.exml", "resource/skins/SellPanelSkin.exml",
"resource/skins/SelledPanelSkin.exml", "resource/skins/GuideSkin.exml",
"resource/skins/ShopBuyPanelSkin.exml", "resource/skins/SellRecordItemSkin.exml",
"resource/skins/ShopItemSkin.exml", "resource/skins/SellRecordSkin.exml",
"resource/skins/ShopSceneSkin.exml", "resource/skins/SelledPanelSkin.exml",
"resource/skins/TaskItemSkin.exml", "resource/skins/ExchangeBuyPanelSkin.exml",
"resource/skins/TaskPanelSkin.exml", "resource/skins/ExchangeItemSkin.exml",
"resource/skins/TaskToastSkin.exml", "resource/skins/ExchangeSceneSkin.exml",
"resource/skins/ToastPanelSkin.exml", "resource/skins/ShopPanelSkin.exml",
"resource/skins/WareHouseSkin.exml", "resource/skins/TaskItemSkin.exml",
"resource/skins/Component/BarSkin.exml", "resource/skins/TaskPanelSkin.exml",
"resource/skins/Component/ProgressNumSkin.exml", "resource/skins/TaskToastSkin.exml",
"resource/skins/Component/TimeProgressBarSkin.exml", "resource/skins/ToastPanelSkin.exml",
"resource/skins/Objs/CropSkin.exml", "resource/skins/WareHouseSkin.exml",
"resource/skins/Objs/LandSkin.exml", "resource/skins/Component/BarSkin.exml",
"resource/skins/Objs/MedalSkin.exml", "resource/skins/Component/ProgressNumSkin.exml",
"resource/skins/Objs/OptionPanelSkin.exml", "resource/skins/Component/TimeProgressBarSkin.exml",
"resource/skins/ui/IconButtonSkin.exml", "resource/skins/Objs/CropSkin.exml",
"resource/skins/ui/ProgressBarSkin.exml" "resource/skins/Objs/LandSkin.exml",
], "resource/skins/Objs/MedalSkin.exml",
"path": "resource/default.thm.json" "resource/skins/Objs/OptionPanelSkin.exml",
"resource/skins/ui/IconButtonSkin.exml",
"resource/skins/ui/ProgressBarSkin.exml"
],
"path": "resource/default.thm.json"
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="CreditsTip" width="750" height="818" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="gameGroup_bg_png" y="67" x="0"/>
<e:Image id="closeBtn" source="closeBtn_png" x="630" y="0"/>
<e:Scroller width="750" height="510" y="308" anchorOffsetY="0" horizontalCenter="0">
<e:Group>
<e:Image id="planeBtn" source="gameGroup_plane_png" y="3.5" horizontalCenter="0"/>
<e:Image id="clearBtn" source="gameGroup_clear_png" y="259" horizontalCenter="0"/>
<e:layout>
<e:VerticalLayout horizontalAlign="center" gap="40"/>
</e:layout>
</e:Group>
</e:Scroller>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<w:Config id="16e64c53e86"/>
<e:Group id="group" horizontalCenter="0" verticalCenter="0" left="0" right="0" bottom="0" top="0">
<e:Image id="bg" scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" source="guide_bg_jpg" visible="false"/>
<e:Group id="guideBack" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624" touchChildren="false" touchEnabled="false">
</e:Group>
<e:Rect verticalCenter="0" top="0" horizontalCenter="0" left="0" right="0" bottom="0" fillAlpha="0.6"/>
<e:Group id="guide1" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624" visible="false">
<e:Image source="plant_land_active_png" x="184" y="550"/>
<e:Image id="guide1_tip" source="guide1_tip_png" x="262" y="795"/>
<e:Button id="guide1_btn" label="" anchorOffsetX="95" anchorOffsetY="23" verticalCenter="151" horizontalCenter="112">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" scaleX.down="0.9" scaleY.down="0.9" height="100%" source="guide1_btn_png" source.down="guide1_btn_png" source.disabled="guide1_btn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image verticalCenter="484.5" y="1236" scaleX="1" scaleY="1" horizontalCenter="79.5" source="商店_png" x="401"/>
</e:Group>
<e:Group id="guide2" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624" visible="false">
<e:Image source="guide2_land_png" x="169" y="527"/>
<e:Image id="guide2_tip" x="262" y="795" source="guide2_tip_png"/>
<e:Button id="guide2_btn" label="" anchorOffsetY="23" anchorOffsetX="95" verticalCenter="119" horizontalCenter="112">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="guide1_btn_png" source.down="guide1_btn_png" source.disabled="guide1_btn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image source="仓库_btn_png" verticalCenter="484.5" y="1236" scaleX="1" scaleY="1" horizontalCenter="-89.5" x="232"/>
</e:Group>
<e:Group id="guide3" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624" visible="false">
<e:Image id="guide3_tip" x="262" y="795" source="guide3_tip_png"/>
<e:Button id="guide3_btn" label="" anchorOffsetX="95" anchorOffsetY="23.5" verticalCenter="118.5" horizontalCenter="112">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="guide3_btn_png" source.down="guide3_btn_png" source.disabled="guide3_btn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image verticalCenter="484.5" y="1236" scaleX="1" scaleY="1" source="任务_png" horizontalCenter="-258.5" x="63"/>
</e:Group>
<e:Group id="guideFrog" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624" touchChildren="false" touchEnabled="false">
<e:Group id="handGroup" x="460" y="1285" visible="false">
<e:Image id="point" source="guide_point_png" x="21.5" y="21.5" anchorOffsetX="21.5" anchorOffsetY="21.5" alpha="0.9" scaleX="0.5" scaleY="0.5"/>
<e:Image id="hand" source="guide_hand_png" x="45" y="44"/>
</e:Group>
</e:Group>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*"> <e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<w:Config id="16e64c53e86"/> <w:Config id="16e64c53e86"/>
<e:Group id="group" horizontalCenter="0" verticalCenter="0" height="1624" left="0" right="0"> <e:Group id="group" horizontalCenter="0" verticalCenter="0" left="0" right="0" bottom="0" top="0">
<e:Image id="bg" source="index_bg_png" scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" locked="true"/> <e:Image id="bg" source="index_bg_png" scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" locked="true"/>
<e:Group id="gameLayer" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624"> <e:Group id="gameLayer" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624">
</e:Group> </e:Group>
<e:Group id="houseBtn" width="252" height="372" x="0" y="243" anchorOffsetX="0" anchorOffsetY="0"/> <e:Group id="houseBtn" width="252" height="372" x="0" anchorOffsetX="0" anchorOffsetY="0" verticalCenter="-383"/>
<e:Image id="xiaoQ" source="小Q_png" x="24" y="794"/> <e:Image id="xiaoE" x="24" source="小E_png" verticalCenter="62.5"/>
</e:Group> </e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -16,15 +16,23 @@ ...@@ -16,15 +16,23 @@
<e:Label id="waterNum" text="× 0" size="28" scaleX="1" scaleY="1" anchorOffsetX="0" right="0" width="108" anchorOffsetY="0" height="50" verticalAlign="middle" verticalCenter="0"/> <e:Label id="waterNum" text="× 0" size="28" scaleX="1" scaleY="1" anchorOffsetX="0" right="0" width="108" anchorOffsetY="0" height="50" verticalAlign="middle" verticalCenter="0"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Group id="avatarPanel" x="26" width="278" height="81" verticalCenter="-500" anchorOffsetX="0"> <e:Group id="avatarPanel" x="26" width="278" height="81" anchorOffsetX="0" y="250">
<e:Image source="头像面板_png" x="0" y="0"/> <e:Image source="头像面板_png" x="0" y="0"/>
<e:Image id="avatarImg" source="默认头像_png" x="10" y="10" width="62" height="62"/> <e:Image id="avatarImg" source="默认头像_png" x="10" y="10" width="62" height="62"/>
<e:Image id="avatarMask" source="默认头像_png" x="10" y="10" width="62" height="62"/> <e:Image id="avatarMask" source="默认头像_png" x="10" y="10" width="62" height="62"/>
<e:Label id="userName" text="欢趣使者" x="79.5" y="18.16" size="20" textColor="0x8f6846"/> <e:Label id="userName" text="欢趣使者" x="79.5" y="18.16" size="20" textColor="0x8f6846"/>
<e:Label id="userGold" text="欢趣豆:0" x="79.5" y="46.83" size="20" textColor="0x8f6846" anchorOffsetX="0" width="174" textAlign="left" wordWrap="false"/> <e:Label id="userGold" text="欢趣豆:0" x="79.5" y="46.83" size="20" textColor="0x8f6846" anchorOffsetX="0" width="174" textAlign="left" wordWrap="false"/>
<e:Image id="medal" source="勋章_png" x="44" y="49" visible="false"/> <e:Image id="medal" source="勋章_png" x="44" y="49" visible="false"/>
<e:Group id="tipGroup" x="229" y="-57" scaleX="1" scaleY="1" anchorOffsetX="0" width="461" height="36">
<e:Image source="广播__m_png" verticalCenter="0" horizontalCenter="0"/>
<e:Group id="tipLabelGroup" x="44" width="417" height="36" verticalCenter="0">
<e:Label id="tipLabel1" text="农作物价格会根据总库存情况发生价格波动,每日出售价格以系统实际展示价格为准。" x="418" size="20" width="860" textAlign="center" y="2.5" verticalAlign="middle" height="36"/>
<e:Label id="tipLabel2" text="农作物价格会根据总库存情况发生价格波动,每日出售价格以系统实际展示价格为准。" x="1278" size="20" width="860" textAlign="center" y="2.5" verticalAlign="middle" height="36"/>
</e:Group>
<e:Rect id="tipLabelMask" width="417" height="36" x="44" y="0"/>
</e:Group>
</e:Group> </e:Group>
<e:Button id="warehouseBtn" label="" verticalCenter="484.5" horizontalCenter="-89.5" anchorOffsetX="53.5" anchorOffsetY="60.5"> <e:Button id="warehouseBtn" label="" horizontalCenter="-89.5" anchorOffsetX="53.5" anchorOffsetY="60.5" verticalCenter="484.5">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="仓库_btn_png" source.down="仓库_btn_png" source.disabled="仓库_btn_png"/> <e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="仓库_btn_png" source.down="仓库_btn_png" source.disabled="仓库_btn_png"/>
...@@ -32,7 +40,7 @@ ...@@ -32,7 +40,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="taskBtn" label="" verticalCenter="484.5" horizontalCenter="-258.5"> <e:Button id="taskBtn" label="" horizontalCenter="-258.5" verticalCenter="484.5">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="任务_png" source.down="任务_png" source.disabled="任务_png"/> <e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="任务_png" source.down="任务_png" source.disabled="任务_png"/>
...@@ -48,7 +56,7 @@ ...@@ -48,7 +56,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="ruleBtn" label="" x="676" y="323" anchorOffsetX="37" anchorOffsetY="42"> <e:Button id="ruleBtn" label="" anchorOffsetX="37" anchorOffsetY="42" y="302" horizontalCenter="301">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="ui_规则_png" source.down="ui_规则_png" source.disabled="ui_规则_png"/> <e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="ui_规则_png" source.down="ui_规则_png" source.disabled="ui_规则_png"/>
...@@ -56,7 +64,7 @@ ...@@ -56,7 +64,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="exchangeBtn" label="" x="676" y="426" anchorOffsetX="37" anchorOffsetY="42"> <e:Button id="exchangeBtn" label="" y="405" anchorOffsetX="37" anchorOffsetY="42" horizontalCenter="301">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="ui_兑换_png" source.down="ui_兑换_png" source.disabled="ui_兑换_png"/> <e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="ui_兑换_png" source.down="ui_兑换_png" source.disabled="ui_兑换_png"/>
...@@ -64,7 +72,7 @@ ...@@ -64,7 +72,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="gameGroupBtn" label="" x="676" y="535" anchorOffsetY="42" anchorOffsetX="37"> <e:Button id="gameGroupBtn" label="" y="514" anchorOffsetY="42" anchorOffsetX="37" horizontalCenter="301">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="ui_农耕舍_png" source.down="ui_农耕舍_png" source.disabled="ui_农耕舍_png"/> <e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="ui_农耕舍_png" source.down="ui_农耕舍_png" source.disabled="ui_农耕舍_png"/>
...@@ -72,7 +80,7 @@ ...@@ -72,7 +80,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="shopBtn" label="" verticalCenter="484.5" horizontalCenter="79.5"> <e:Button id="shopBtn" label="" horizontalCenter="79.5" verticalCenter="484.5">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="商店_png" source.down="商店_png" source.disabled="商店_png"/> <e:Image width="100%" height="100%" scaleX.down="0.9" scaleY.down="0.9" source="商店_png" source.down="商店_png" source.disabled="商店_png"/>
...@@ -80,13 +88,5 @@ ...@@ -80,13 +88,5 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Group id="tipGroup" x="255" y="215" scaleX="1" scaleY="1" anchorOffsetX="0" width="461" height="36">
<e:Image source="广播__m_png" verticalCenter="0" horizontalCenter="0"/>
<e:Group id="tipLabelGroup" x="44" width="417" height="36" verticalCenter="0">
<e:Label id="tipLabel1" text="农作物价格会根据总库存情况发生价格波动,每日出售价格以系统实际展示价格为准。" x="418" size="20" width="860" textAlign="center" y="2.5" verticalAlign="middle" height="36"/>
<e:Label id="tipLabel2" text="农作物价格会根据总库存情况发生价格波动,每日出售价格以系统实际展示价格为准。" x="1278" size="20" width="860" textAlign="center" y="2.5" verticalAlign="middle" height="36"/>
</e:Group>
<e:Rect id="tipLabelMask" width="417" height="36" x="44" y="0"/>
</e:Group>
</e:Group> </e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="CreditsTip" width="750" height="1335" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Button id="closeBtn" label="" y="133.52" x="571">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeBtn_png" source.down="closeBtn_png" source.disabled="closeBtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image source="shop_bug_bg_png" y="238.79" horizontalCenter="0"/>
<e:Image id="btn" source="shop_buy_btn_png" y="630" horizontalCenter="0"/>
<e:Image id="titleImg" source="shop_buy_speed_png" y="290" horizontalCenter="0"/>
<e:Label id="title" text="加速卡" y="452" size="26" horizontalCenter="0"/>
<e:Label id="introduce" text="功能介绍:功能介绍功能介绍" y="505.67" textColor="0xb2ada8" size="20" horizontalCenter="0"/>
<e:Label id="price" text="所需欢趣豆:888" y="590" textColor="0xB2ADA8" size="20" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="CreditsTip" width="541" height="270" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="货柜_png" bottom="0" horizontalCenter="0" locked="true"/>
<e:Group id="btn" horizontalCenter="0" verticalCenter="-32" width="522" height="206">
<e:Image source="shop_goods_bg_png" horizontalCenter="0" verticalCenter="0"/>
<e:Image id="icon" width="113" height="113" x="20" y="26"/>
<e:Label id="title" text="标题" size="26" textColor="0x4a4a4a" x="153" y="26"/>
<e:Label id="add1" text="+" x="201" y="84.5" textColor="0x855933" size="26" alpha="0.6" visible="false"/>
<e:Label id="add2" text="+" x="281" y="84.5" textColor="0x855933" size="26" alpha="0.6" visible="false"/>
<e:Label id="add3" text="+" x="361" y="84.5" textColor="0x855933" size="26" alpha="0.6" visible="false"/>
<e:Label id="add4" text="+" x="441" y="84.5" textColor="0x855933" size="26" alpha="0.6" visible="false"/>
<e:Label id="add5" text="+" x="521" y="84.5" textColor="0x855933" size="26" alpha="0.6" visible="false"/>
<e:Group id="sp_1_group" x="150" y="64" width="38" height="67" visible="false">
<e:Image y="0" source="shop_goods_egg_png" horizontalCenter="0"/>
<e:Label id="sp_1_label" text="0/0" y="48.8" textColor="0x855933" size="18" horizontalCenter="0"/>
</e:Group>
<e:Group id="sp_2_group" x="230" y="64" width="38" height="67" visible="false">
<e:Image source="shop_goods_wheat_png" y="0" horizontalCenter="0"/>
<e:Label id="sp_2_label" text="0/0" y="48.8" textColor="0x855933" size="18" horizontalCenter="0"/>
</e:Group>
<e:Group id="sp_3_group" x="310" y="64" width="38" height="67" visible="false">
<e:Image y="0" horizontalCenter="0" source="shop_goods_corn_png"/>
<e:Label id="sp_3_label" text="0/0" y="48.8" textColor="0x855933" size="18" horizontalCenter="0"/>
</e:Group>
<e:Group id="sp_4_group" x="390" y="64" width="38" height="67" visible="false">
<e:Image y="0" horizontalCenter="0" source="shop_goods_milk_png"/>
<e:Label id="sp_4_label" text="0/0" y="48.8" textColor="0x855933" size="18" horizontalCenter="0"/>
</e:Group>
<e:Group id="sp_5_group" x="400" y="64" width="38" height="67" visible="false">
<e:Image y="0" horizontalCenter="0" source="shop_goods_potato_png"/>
<e:Label id="sp_5_label" text="0/0" y="48.8" textColor="0x855933" size="18" horizontalCenter="0"/>
</e:Group>
<e:Group id="sp_6_group" x="410" y="64" width="38" height="67" visible="false">
<e:Image y="0" horizontalCenter="0" source="shop_goods_walnut_png"/>
<e:Label id="sp_6_label" text="0/0" y="48.8" textColor="0x855933" size="18" horizontalCenter="0"/>
</e:Group>
<e:Label id="stock_label" text="剩余0份" x="19" y="176" textColor="0xed3330" size="18" bold="true" locked="true"/>
<e:Rect id="mk" anchorOffsetX="0" anchorOffsetY="0" left="0" top="0" right="0" bottom="0" ellipseWidth="22" ellipseHeight="22" fillColor="0x6c3907" fillAlpha="0.6" visible="false"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<w:Config id="16e64c53e86"/>
<e:Group id="group" left="0" right="0" horizontalCenter="0" touchChildren="true" touchEnabled="false" top="0" height="1624">
<e:Group id="shopLayer" left="0" right="0" horizontalCenter="0" verticalCenter="0" height="1624" x="0" y="0" scaleX="1" scaleY="1">
<e:Image source="shop_bg_png" horizontalCenter="0" verticalCenter="0" locked="true"/>
<e:Image id="backBtn" source="返回农场_png" horizontalCenter="-272.5" verticalCenter="-495"/>
<e:Group x="151" y="430" locked="true" visible="false">
<e:Image id="goodsBtn" source="商品w_png" x="0" y="0"/>
<e:Image id="propBtn" source="道具b_png" x="224" y="0"/>
</e:Group>
<e:Group id="goodsGroup" width="541" height="740" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="-0.5" y="524">
<e:Group id="none" horizontalCenter="0" verticalCenter="0" top="0" right="0" left="0" bottom="0" visible="false">
<e:Label text="补货中,晚点再来看看吧" y="112" scaleX="1" scaleY="1" size="28" horizontalCenter="0"/>
<e:Image source="货柜_png" y="200" scaleX="1" scaleY="1" horizontalCenter="0"/>
<e:Image source="货柜_png" y="501" scaleX="1" scaleY="1" horizontalCenter="0"/>
</e:Group>
<e:Scroller id="have" scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" top="0" left="0" right="0" bottom="0">
<e:Group anchorOffsetX="0" width="203.03" anchorOffsetY="0" height="736.12" x="0" y="-74">
<e:List id="list" left="0" right="0" y="55">
<e:layout>
<e:VerticalLayout gap="37"/>
</e:layout>
</e:List>
</e:Group>
</e:Scroller>
</e:Group>
<e:Group id="propGroup" width="539.39" height="662.12" anchorOffsetX="0" anchorOffsetY="0" verticalCenter="118" horizontalCenter="0" visible="false">
<e:Image source="货柜_png" y="222" scaleX="1" scaleY="1" horizontalCenter="0"/>
<e:Image source="货柜_png" y="523" scaleX="1" scaleY="1" horizontalCenter="-0.19499999999999318"/>
<e:Group id="speedGroup" x="62.5" y="48">
<e:Image source="shop_speed_png" y="0" horizontalCenter="0"/>
<e:Label id="speedLabel" text="所需欢趣豆:0" y="146" textColor="0xbf9a71" size="18" horizontalCenter="0"/>
<e:Image id="speedBtn" source="shop_buy_png" y="178" horizontalCenter="0"/>
</e:Group>
<e:Group id="waterGroup" x="323" y="48">
<e:Image y="0" horizontalCenter="0" source="shop_water_png"/>
<e:Label id="waterLabel" text="所需欢趣豆:0" y="146" textColor="0xBF9A71" size="18" horizontalCenter="0"/>
<e:Image id="waterBtn" source="shop_buy_png" y="178" horizontalCenter="0"/>
</e:Group>
<e:Group id="foodGroup" x="63" y="350">
<e:Image y="0" horizontalCenter="0" source="shop_food_png"/>
<e:Label id="foodLabel" text="所需欢趣豆:0" y="146" textColor="0xBF9A71" size="18" horizontalCenter="0"/>
<e:Image id="foodBtn" source="shop_buy_png" y="178" horizontalCenter="0"/>
</e:Group>
</e:Group>
<e:Image source="前景_png" touchEnabled="false" scaleX="1" scaleY="1" y="662" horizontalCenter="0" locked="true"/>
<e:Image source="灯_png" horizontalCenter="0" x="195" y="515" scaleX="1" scaleY="1" touchEnabled="false" locked="true"/>
</e:Group>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="CreditsTip" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image y="500.33" source="unlock_bg_png" horizontalCenter="0"/>
<e:Image id="closeBtn" source="closeBtn_png" x="532" y="433.33"/>
<e:Label id="label" text="一个鸡蛋=50个欢趣豆" y="640.83" size="24" textColor="0x66492f" horizontalCenter="0"/>
<e:Button id="cancel" label="" x="174" y="745.33">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="unlock_cancel_png" source.down="unlock_cancel_png" source.disabled="unlock_cancel_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="btn" label="" x="383" y="745.33">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="unlock_btn_png" source.down="unlock_btn_png" source.disabled="unlock_btn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
...@@ -4,7 +4,7 @@ import { G_GetHomeDataByKey, HOME } from "../Scenes/Home"; ...@@ -4,7 +4,7 @@ import { G_GetHomeDataByKey, HOME } from "../Scenes/Home";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import { GDispatcher } from "../../libs/tc/util/GDispatcher"; import { GDispatcher } from "../../libs/tc/util/GDispatcher";
export default class ShopBuyPanel extends Panel { export default class ExchangeBuyPanel extends Panel {
public closeBtn: eui.Button; public closeBtn: eui.Button;
public btn: eui.Image; public btn: eui.Image;
public titleImg: eui.Image; public titleImg: eui.Image;
...@@ -13,11 +13,11 @@ export default class ShopBuyPanel extends Panel { ...@@ -13,11 +13,11 @@ export default class ShopBuyPanel extends Panel {
public price: eui.Label; public price: eui.Label;
public get skinKey() { public get skinKey() {
return 'ShopBuyPanel' return 'ExchangeBuyPanel'
} }
public get groupName() { public get groupName() {
return 'shop_buy' return 'shop'
} }
constructor(data?) { constructor(data?) {
......
import Panel from "../views/Panel";
import Tween = egret.Tween;
import Image = eui.Image;
export default class GameGroupPanel extends Panel {
public closeBtn: Image;
public planeBtn: Image;
public clearBtn: Image;
public get skinKey() {
return 'GameGroup'
}
public get groupName() {
return 'gameGroup_panel'
}
constructor(data?) {
super(data);
}
onShowAnim() {
const canvasH = 750 / window.innerWidth * window.innerHeight;
Tween.get(this).set({y: canvasH}).to({y: canvasH - this.height}, 300, egret.Ease.quadInOut);
}
protected getTapEvts(): any[] {
return super.getTapEvts()
.concat([
[this.planeBtn, this.onTap, this],
[this.clearBtn, this.onTap, this],
]);
}
private onTap(e) {
switch (e.target) {
case this.planeBtn:
break;
case this.clearBtn:
break;
}
}
protected start() {
super.start();
this.initUI();
}
private initUI(): void {
}
destroy() {
super.destroy();
}
}
import Panel from "../views/Panel";
import Tween = egret.Tween;
import {loadSvga} from "../comm/loadSvga";
import {getSvga} from "../utils";
export default class Guide extends Panel {
public group: eui.Group;
public bg: eui.Image;
public guideBack: eui.Group;
public guide1: eui.Group;
public guide1_tip: eui.Image;
public guide1_btn: eui.Button;
public guide2: eui.Group;
public guide2_tip: eui.Image;
public guide2_btn: eui.Button;
public guide3: eui.Group;
public guide3_tip: eui.Image;
public guide3_btn: eui.Button;
public guideFrog: eui.Group;
public handGroup: eui.Group;
public point: eui.Image;
public hand: eui.Image;
public get skinKey() {
return 'Guide'
}
public get groupName() {
return 'guide'
}
constructor(data?) {
super(data);
}
onShowAnim() {
return Tween.get(this);
}
onHide(): egret.Tween {
return Tween.get(this);
}
protected async start() {
super.start();
this.height = 750 / window.innerWidth * window.innerHeight;
const mv = await loadSvga(getSvga('guide_panda'));
this.guideFrog.addChild(mv);
mv.x = 80;
mv.y = 800;
this.showGuide(this.guide1);
this.showHand(460);
}
protected getTapEvts(): any[] {
return super.getTapEvts()
.concat([
[this.guide1_btn, this.onTap, this],
[this.guide2_btn, this.onTap, this],
[this.guide3_btn, this.onTap, this],
]);
}
private onTap(e) {
switch (e.target) {
case this.guide1_btn:
this.guide1.visible = false;
this.showGuide(this.guide2);
this.showHand(285);
break;
case this.guide2_btn:
this.guide2.visible = false;
this.showGuide(this.guide3);
this.showHand(120);
break;
case this.guide3_btn:
this.data.call();
break;
}
}
public showGuide(node) {
Tween.get(node)
.set({alpha: 0, visible: true})
.to({alpha: 1}, 500);
}
public showHand(x) {
Tween.get(this.handGroup)
.set({visible: true, alpha: 0, x: x})
.wait(500)
.to({alpha: 1}, 400)
.call(() => {
this.handEffect();
});
}
public handEffect() {
const _x = this.hand.x;
const _y = this.hand.y;
const duration = 750;
Tween.get(this.hand)
.to({x: _x - 30, y: _y - 30}, duration)
.to({x: _x, y: _y}, duration)
.to({x: _x - 30, y: _y - 30}, duration)
.to({x: _x, y: _y}, duration)
.to({x: _x - 30, y: _y - 30}, duration)
.to({x: _x, y: _y}, duration);
Tween.get(this.point)
.to({scaleX: 1, scaleY: 1}, duration)
.to({scaleX: 0.5, scaleY: 0.5}, duration)
.to({scaleX: 1, scaleY: 1}, duration)
.to({scaleX: 0.5, scaleY: 0.5}, duration)
.to({scaleX: 1, scaleY: 1}, duration)
.to({scaleX: 0.5, scaleY: 0.5}, duration)
.call(() => {
Tween.get(this.handGroup)
.set({visible: true, alpha: 0});
});
}
public initEvents() {
super.initEvents();
}
public removeEvents() {
super.removeEvents();
}
}
import Panel from "../views/Panel";
import {M_UpdateLand} from "../Scenes/MainScene/LandMgr";
export default class UnlockPanel extends Panel {
public closeBtn: eui.Image;
public label: eui.Label;
public cancel: eui.Button;
public btn: eui.Button;
public get skinKey() {
return 'UnlockPanel'
}
public get groupName() {
return 'unlock_panel'
}
constructor(data?) {
super(data);
}
onShowAnim() {
egret.Tween.get(this).set({alpha: 0}).to({alpha: 1}, 233, egret.Ease.quadInOut);
}
protected getTapEvts(): any[] {
return super.getTapEvts()
.concat([
[this.btn, this.onTap, this],
[this.cancel, this.onTap, this],
]);
}
private onTap(e) {
switch (e.target) {
case this.btn:
/// TODO 解锁土地,刷新土地,关闭弹窗
const landId = this.data.landId;
console.log(landId);
M_UpdateLand(landId);
this.data.call();
this.hidePanel();
break;
case this.cancel:
this.hidePanel();
break;
}
}
protected start() {
super.start();
this.initUI();
}
private initUI(): void {
}
destroy() {
super.destroy();
}
}
...@@ -6,6 +6,7 @@ import {loadSvga} from "../../comm/loadSvga"; ...@@ -6,6 +6,7 @@ import {loadSvga} from "../../comm/loadSvga";
import {getSvga} from "../../utils"; import {getSvga} from "../../utils";
import M_EVENT from "./MSceneEnum"; import M_EVENT from "./MSceneEnum";
import {M_HideOption} from "./Objs/OptionPanel"; import {M_HideOption} from "./Objs/OptionPanel";
import MovieClip = egret.MovieClip;
/** /**
* 示意图 * 示意图
...@@ -86,7 +87,7 @@ export default class LandMgr { ...@@ -86,7 +87,7 @@ export default class LandMgr {
MainIns().gameLayer.addChildAt(newLand, v.id); MainIns().gameLayer.addChildAt(newLand, v.id);
this.lands.push(newLand); // 加入数组方便管理 this.lands.push(newLand); // 加入数组方便管理
} }
const mv: egret.MovieClip = await loadSvga(getSvga('流水动效')); const mv = await loadSvga(getSvga('流水动效'));
mv.x = 550; mv.x = 550;
mv.y = 865; mv.y = 865;
mv.touchEnabled = false; mv.touchEnabled = false;
...@@ -106,7 +107,7 @@ export default class LandMgr { ...@@ -106,7 +107,7 @@ export default class LandMgr {
private updateLandInfo(id?) { private updateLandInfo(id?) {
console.log('Update Lands', id); console.log('Update Lands', id);
NetManager.ins.getLandInfo((success, res) => { NetManager.ins.getLandInfo((success, res) => {
M_HideOption(); // M_HideOption(); /// TODO 好像没用。。。。
if (!success) { if (!success) {
return; return;
} }
......
...@@ -4,12 +4,13 @@ import LandMgr from "./LandMgr"; ...@@ -4,12 +4,13 @@ import LandMgr from "./LandMgr";
import OptionPanel, {M_HideOption} from "./Objs/OptionPanel"; import OptionPanel, {M_HideOption} from "./Objs/OptionPanel";
import Dispatcher from "../../comm/Dispatcher"; import Dispatcher from "../../comm/Dispatcher";
import ProgressMgr from "./ProgressMgr"; import ProgressMgr from "./ProgressMgr";
import Tween = egret.Tween;
import SceneCtrl from "../../ctrls/sceneCtrl"; import SceneCtrl from "../../ctrls/sceneCtrl";
import {ModuleTypes} from "../../types/sceneTypes"; import {ModuleTypes} from "../../types/sceneTypes";
import Group = eui.Group; import Group = eui.Group;
import Image = eui.Image; import Image = eui.Image;
import {preLoadRes} from "../../comm/UtilsConst"; import {preLoadRes} from "../../comm/UtilsConst";
import PanelCtrl from "../../ctrls/panelCtrl";
import UnlockPanel from "../../Panels/UnlockPanel";
////////////////// Instance ////////////////// ////////////////// Instance //////////////////
let instance: MainScene = null; let instance: MainScene = null;
...@@ -60,7 +61,7 @@ export default class MainScene extends Scene { ...@@ -60,7 +61,7 @@ export default class MainScene extends Scene {
public progressMgr: ProgressMgr; public progressMgr: ProgressMgr;
public houseBtn: Group; public houseBtn: Group;
public xiaoQ: Image; public xiaoE: Image;
constructor(data?) { constructor(data?) {
super(data); super(data);
...@@ -115,7 +116,7 @@ export default class MainScene extends Scene { ...@@ -115,7 +116,7 @@ export default class MainScene extends Scene {
return super.getTapEvts().concat([ return super.getTapEvts().concat([
[this.bg, this.onTouchTap, this], // 点到bg触发Option隐藏,因为在游戏层中其他游戏元素都在bg上层 [this.bg, this.onTouchTap, this], // 点到bg触发Option隐藏,因为在游戏层中其他游戏元素都在bg上层
[this.houseBtn, this.onTap, this], [this.houseBtn, this.onTap, this],
[this.xiaoQ, this.onTap, this], [this.xiaoE, this.onTap, this],
]); ]);
} }
...@@ -136,9 +137,9 @@ export default class MainScene extends Scene { ...@@ -136,9 +137,9 @@ export default class MainScene extends Scene {
SceneCtrl.instance.change(ModuleTypes.ROOM_SCENE); SceneCtrl.instance.change(ModuleTypes.ROOM_SCENE);
break; break;
case this.xiaoQ: case this.xiaoE:
/// TODO 小Q /// TODO 小E
console.log('点击小Q'); console.log('点击小E');
break; break;
default: default:
......
...@@ -15,6 +15,8 @@ import RulePanel from "../../Panels/RulePanel"; ...@@ -15,6 +15,8 @@ import RulePanel from "../../Panels/RulePanel";
import WareHousePanel from "../../Panels/WareHousePanel"; import WareHousePanel from "../../Panels/WareHousePanel";
import NewUserPanel from "../../Panels/NewUserPanel"; import NewUserPanel from "../../Panels/NewUserPanel";
import OldUserPanel from "../../Panels/OldUserPanel"; import OldUserPanel from "../../Panels/OldUserPanel";
import GameGroupPanel from "../../Panels/GameGroupPanel";
import Guide from "../../Panels/Guide";
export let propData = { export let propData = {
sp_food_1: {name: 'food',}, sp_food_1: {name: 'food',},
...@@ -68,6 +70,7 @@ export default class MainUI extends ComponentBase { ...@@ -68,6 +70,7 @@ export default class MainUI extends ComponentBase {
[this.exchangeBtn, this.onTap, this], [this.exchangeBtn, this.onTap, this],
[this.avatarImg, this.onTap, this], [this.avatarImg, this.onTap, this],
[this.ruleBtn, this.onTap, this], [this.ruleBtn, this.onTap, this],
[this.gameGroupBtn, this.onTap, this],
]).concat([ // OptionPanel ]).concat([ // OptionPanel
[this.foodGroup, this.onTapOption, this], [this.foodGroup, this.onTapOption, this],
[this.waterGroup, this.onTapOption, this], [this.waterGroup, this.onTapOption, this],
...@@ -126,6 +129,10 @@ export default class MainUI extends ComponentBase { ...@@ -126,6 +129,10 @@ export default class MainUI extends ComponentBase {
// }); // });
break; break;
case this.gameGroupBtn: // 兑换
PanelCtrl.instance.show(GameGroupPanel);
break;
case this.exchangeBtn: // 兑换 case this.exchangeBtn: // 兑换
await G_UpdateHomeData(); await G_UpdateHomeData();
SceneCtrl.instance.change(ModuleTypes.SHOP_SCENE); SceneCtrl.instance.change(ModuleTypes.SHOP_SCENE);
...@@ -270,14 +277,19 @@ export default class MainUI extends ComponentBase { ...@@ -270,14 +277,19 @@ export default class MainUI extends ComponentBase {
this.userName.text = (!data || !data.nickname || (data.nickname == 'null')) this.userName.text = (!data || !data.nickname || (data.nickname == 'null'))
? '欢趣使者' : ((data.nickname.length > 7) ? data.nickname.slice(0, 7) + '...' : data.nickname); ? '欢趣使者' : ((data.nickname.length > 7) ? data.nickname.slice(0, 7) + '...' : data.nickname);
if (data.popup) { if (data.newUser) {
if (data.newUser) { PanelCtrl.instance.show(Guide, {
PanelCtrl.instance.show(NewUserPanel); call: () => {
} else { if (data.popup) {
PanelCtrl.instance.show(OldUserPanel); if (data.newUser) {
} PanelCtrl.instance.show(NewUserPanel);
} else {
PanelCtrl.instance.show(OldUserPanel);
}
}
}
}, false);
} }
}); });
} }
......
...@@ -226,8 +226,8 @@ export default class Crop extends eui.Component { ...@@ -226,8 +226,8 @@ export default class Crop extends eui.Component {
MainIns().mainUI.addChild(catherImg); MainIns().mainUI.addChild(catherImg);
// 移动 // 移动
let _x = MainIns().mainUI.warehouseBtn.x; const _x = MainIns().mainUI.warehouseBtn.x;
let _y = MainIns().mainUI.warehouseBtn.y; const _y = MainIns().mainUI.warehouseBtn.y;
Tween.get(catherImg) Tween.get(catherImg)
.to({y: cy - 10}, 170) .to({y: cy - 10}, 170)
.to({y: cy + 10}, 160, Ease.quadInOut) .to({y: cy + 10}, 160, Ease.quadInOut)
......
import {getSkinPath} from "../../../utils"; import {getSkinPath, getSvga} from "../../../utils";
import Crop from "./Crop"; import Crop from "./Crop";
import {NetManager} from "../../../../libs/tw/manager/NetManager"; import {NetManager} from "../../../../libs/tw/manager/NetManager";
import {getlogItem} from "../../../comm/getlogItem"; import {getlogItem} from "../../../comm/getlogItem";
import {M_HideOption, M_ShowOption} from "./OptionPanel"; import {M_HideOption, M_ShowOption} from "./OptionPanel";
import {detectionDiamond, petData} from "../Const"; import {detectionDiamond, petData} from "../Const";
import TouchEvent = egret.TouchEvent; import TouchEvent = egret.TouchEvent;
import PanelCtrl from "../../../ctrls/panelCtrl";
import UnlockPanel from "../../../Panels/UnlockPanel";
import Image = eui.Image;
import {loadSvga} from "../../../comm/loadSvga";
import Event = egret.Event;
import {waitAsync} from "../../../comm/UtilsConst";
enum LAND_STATE { enum LAND_STATE {
NONE = 'none', // 无 NONE = 'none', // 无
...@@ -18,9 +24,9 @@ enum LAND_STATE { ...@@ -18,9 +24,9 @@ enum LAND_STATE {
* 土地类 * 土地类
*/ */
export default class Land extends eui.Component { export default class Land extends eui.Component {
public land: eui.Image; public land: Image;
public fence: eui.Image; public fence: Image;
public trough: eui.Image; public trough: Image;
private data = null; private data = null;
...@@ -54,6 +60,10 @@ export default class Land extends eui.Component { ...@@ -54,6 +60,10 @@ export default class Land extends eui.Component {
this.crop.plant(data); this.crop.plant(data);
} }
/**
* 更新数据
* @param data
*/
public updateData(data) { public updateData(data) {
this.data = data; this.data = data;
this.changeState(LAND_STATE.NONE); this.changeState(LAND_STATE.NONE);
...@@ -102,21 +112,53 @@ export default class Land extends eui.Component { ...@@ -102,21 +112,53 @@ export default class Land extends eui.Component {
} }
/* TODO ios14像素点击不能用 手动检测菱形包围盒 */ /* TODO ios14像素点击不能用 手动检测菱形包围盒 */
console.log(`点击了第${this.index}块土地, 当前状态是${this.state}`); console.log(`%c点击了第${this.index}块土地, 当前状态是${this.state}`, 'color:green');
if (this.state != LAND_STATE.NONE) {
const event = new TouchEvent(TouchEvent.TOUCH_TAP); switch (this.state) {
event.$setTarget(this.crop); case LAND_STATE.LOCK: // 锁住的
this.crop.dispatchEvent(e); M_HideOption();
return; PanelCtrl.instance.show(UnlockPanel, {
landId: this.index,
call: this.unlock
});
break;
case LAND_STATE.NONE: // 没有
// 显示Option
NetManager.ins.clickLog(getlogItem(this.index + 7)); // 8, 9, 10, 11
M_ShowOption({index: this.index});
this.changeState(LAND_STATE.ACTIVE);
break;
case LAND_STATE.ANIMAL: // 动物
case LAND_STATE.PLANT: // 植物
const event = new TouchEvent(TouchEvent.TOUCH_TAP);
event.$setTarget(this.crop);
this.crop.dispatchEvent(e);
break;
case LAND_STATE.ACTIVE: // 点击激活的 肯定没有这种情况
break;
} }
// 显示Option }
NetManager.ins.clickLog(getlogItem(this.index + 7)); // 8, 9, 10, 11
M_ShowOption({index: this.index}); /**
this.changeState(LAND_STATE.ACTIVE); * 解锁土地
*/
private unlock = async () => {
await waitAsync(500);
const unlockEffect = await loadSvga(getSvga('unlock_land'));
unlockEffect.y = -65;
unlockEffect.addEventListener(Event.COMPLETE, () => {
unlockEffect.stop();
this.removeChild(unlockEffect);
}, this);
this.addChild(unlockEffect);
} }
private initUI() { private initUI() {
NetManager.ins.showLog(getlogItem(this.index + 7)); // 8, 9, 10, 11 NetManager.ins.showLog(getlogItem(this.index + 7)); // 8, 9, 10, 11 TODO 埋点问题
this.setTouchOption(); // 设置点击参数 this.setTouchOption(); // 设置点击参数
// 根据数据添加Crop 初始化状态 // 根据数据添加Crop 初始化状态
...@@ -133,8 +175,6 @@ export default class Land extends eui.Component { ...@@ -133,8 +175,6 @@ export default class Land extends eui.Component {
this.state = state; // 设置状态 this.state = state; // 设置状态
console.log(state);
this.land.source = `plant_land_${this.state}_png`; // 设置图片 this.land.source = `plant_land_${this.state}_png`; // 设置图片
this.fence.visible = (this.state == LAND_STATE.ANIMAL); // 显示栅栏 this.fence.visible = (this.state == LAND_STATE.ANIMAL); // 显示栅栏
this.trough.visible = (this.state == LAND_STATE.ANIMAL); // 显示食槽 this.trough.visible = (this.state == LAND_STATE.ANIMAL); // 显示食槽
...@@ -153,6 +193,10 @@ export default class Land extends eui.Component { ...@@ -153,6 +193,10 @@ export default class Land extends eui.Component {
case LAND_STATE.ANIMAL: // 动物 case LAND_STATE.ANIMAL: // 动物
break; break;
case LAND_STATE.LOCK: // 动物
break;
default: default:
break; break;
} }
......
...@@ -8,57 +8,46 @@ import { getSkinPath } from "../../utils"; ...@@ -8,57 +8,46 @@ import { getSkinPath } from "../../utils";
import {btnDelay, preLoadRes, showToast} from "../../comm/UtilsConst"; import {btnDelay, preLoadRes, showToast} from "../../comm/UtilsConst";
import { G_GetHomeDataByKey, G_UpdateHomeData, HOME } from "../Home"; import { G_GetHomeDataByKey, G_UpdateHomeData, HOME } from "../Home";
import { getlogDpm, getlogItem } from "../../comm/getlogItem"; import { getlogDpm, getlogItem } from "../../comm/getlogItem";
import Tween = egret.Tween; import ExchangePanel from "../../Panels/ExchangePanel";
export const shopSpData = { // export const shopSpData = {
sp_prop_1: { // 加速卡 // sp_prop_1: { // 加速卡
spId: 'sp_prop_1', // spId: 'sp_prop_1',
name: 'speed', // name: 'speed',
title: '加速卡', // title: '加速卡',
price: 0, // price: 0,
stock: 0, // stock: 0,
introduce: '加速作物成长,每张加速卡可减免4小时的成长时长' // introduce: '加速作物成长,每张加速卡可减免4小时的成长时长'
}, // },
sp_food_1: { // 饲料 // sp_food_1: { // 饲料
spId: 'sp_food_1', // spId: 'sp_food_1',
name: 'food', // name: 'food',
title: '饲料', // title: '饲料',
price: 0, // price: 0,
stock: 0, // stock: 0,
introduce: '用于喂养动物成长,每使用一次消耗一袋饲料' // introduce: '用于喂养动物成长,每使用一次消耗一袋饲料'
}, // },
sp_food_2: { // 水 // sp_food_2: { // 水
spId: 'sp_food_2', // spId: 'sp_food_2',
name: 'water', // name: 'water',
title: '水', // title: '水',
price: 0, // price: 0,
stock: 0, // stock: 0,
introduce: '用于浇灌植物成长,每使用一次消耗一壶水' // introduce: '用于浇灌植物成长,每使用一次消耗一壶水'
}, // },
}; // };
const ruNum = 20; // 发奖规则的个数 const ruNum = 20; // 发奖规则的个数
export default class ShopScene extends Scene { export default class ShopScene extends Scene {
public group: eui.Group; public group:eui.Group;
public shopLayer: eui.Group; public shopLayer:eui.Group;
public backBtn: eui.Image; public backBtn:eui.Image;
public goodsBtn: eui.Image; public goodsGroup:eui.Group;
public propBtn: eui.Image; public none:eui.Group;
public goodsGroup: eui.Group; public have:eui.Scroller;
public none: eui.Group; public list:eui.List;
public have: eui.Scroller;
public list: eui.List;
public propGroup: eui.Group;
public speedGroup: eui.Group;
public speedLabel: eui.Label;
public speedBtn: eui.Image;
public waterGroup: eui.Group;
public waterLabel: eui.Label;
public waterBtn: eui.Image;
public foodGroup: eui.Group;
public foodLabel: eui.Label;
public foodBtn: eui.Image;
private prizeData = {}; private prizeData = {};
private canShow: boolean = true; private canShow: boolean = true;
...@@ -71,11 +60,11 @@ export default class ShopScene extends Scene { ...@@ -71,11 +60,11 @@ export default class ShopScene extends Scene {
super.start(); super.start();
this.initUI(); this.initUI();
preLoadRes('shop_buy', 'exchange_panel', 'exchanged_panel'); preLoadRes('exchange_panel', 'exchanged_panel');
} }
private reset() { private reset() {
this.getPropInfo(); // 获得道具详情 // this.getPropInfo(); // 获得道具详情
this.setGoods(); this.setGoods();
} }
...@@ -93,33 +82,9 @@ export default class ShopScene extends Scene { ...@@ -93,33 +82,9 @@ export default class ShopScene extends Scene {
protected getTapEvts(): any[] { protected getTapEvts(): any[] {
return super.getTapEvts().concat([ return super.getTapEvts().concat([
[this.backBtn, this.onTouchTap, this], [this.backBtn, this.onTouchTap, this],
[this.goodsBtn, this.onTouchTap, this],
[this.propBtn, this.onTouchTap, this],
]); ]);
} }
private buyProp(e: egret.TouchEvent) {
btnDelay(e.target);
let data = null;
switch (e.target) {
case this.speedBtn: // 买加速卡
NetManager.ins.clickLog(getlogItem(22));
data = shopSpData['sp_prop_1'];
break;
case this.waterBtn: // 买水
NetManager.ins.clickLog(getlogItem(23));
data = shopSpData['sp_food_2'];
break;
case this.foodBtn: // 买饲料
NetManager.ins.clickLog(getlogItem(24));
data = shopSpData['sp_food_1'];
break;
default:
break;
}
PanelCtrl.instance.show(ModuleTypes.SHOP_BUY_PANEL, data);
}
private onTouchTap(e: egret.TouchEvent) { private onTouchTap(e: egret.TouchEvent) {
switch (e.target) { switch (e.target) {
case this.backBtn: case this.backBtn:
...@@ -132,24 +97,6 @@ export default class ShopScene extends Scene { ...@@ -132,24 +97,6 @@ export default class ShopScene extends Scene {
}); });
break; break;
case this.goodsBtn:
NetManager.ins.clickLog(getlogItem(19));
this.goodsBtn.source = '商品w_png';
this.propBtn.source = '道具b_png';
this.goodsGroup.visible = true;
this.propGroup.visible = false;
this.setGoods();
break;
case this.propBtn:
NetManager.ins.clickLog(getlogItem(20));
this.goodsBtn.source = '商品b_png';
this.propBtn.source = '道具w_png';
this.goodsGroup.visible = false;
this.propGroup.visible = true;
this.getPropInfo();
break;
default: default:
break; break;
} }
...@@ -170,7 +117,7 @@ export default class ShopScene extends Scene { ...@@ -170,7 +117,7 @@ export default class ShopScene extends Scene {
this.none.visible = (_d.length <= 0); this.none.visible = (_d.length <= 0);
this.have.visible = !(_d.length <= 0); this.have.visible = !(_d.length <= 0);
this.list.useVirtualLayout = false; this.list.useVirtualLayout = false;
this.list.itemRenderer = ShopItem; this.list.itemRenderer = ExchangeItem;
this.list.dataProvider = new eui.ArrayCollection(_d); this.list.dataProvider = new eui.ArrayCollection(_d);
}).catch(() => { }).catch(() => {
this.none.visible = true; this.none.visible = true;
...@@ -266,37 +213,37 @@ export default class ShopScene extends Scene { ...@@ -266,37 +213,37 @@ export default class ShopScene extends Scene {
/** /**
* 获得道具库存价格信息 * 获得道具库存价格信息
*/ */
private getPropInfo() { // private getPropInfo() {
NetManager.ins.propInfo((success, res) => { // NetManager.ins.propInfo((success, res) => {
if (!success) { // if (!success) {
return; // return;
} // }
let data = {}; // let data = {};
res.data.forEach((v) => { // res.data.forEach((v) => {
data[v.spId] = {}; // data[v.spId] = {};
data[v.spId].stock = v.stock; // data[v.spId].stock = v.stock;
data[v.spId].price = v.price; // data[v.spId].price = v.price;
}); // });
for (let k in shopSpData) { // for (let k in shopSpData) {
const spd = shopSpData[k]; // const spd = shopSpData[k];
const d = data[k] || null; // const d = data[k] || null;
shopSpData[k].price = d.price; // shopSpData[k].price = d.price;
shopSpData[k].stock = d.stock; // shopSpData[k].stock = d.stock;
//
const btn = this[`${spd.name}Btn`]; // const btn = this[`${spd.name}Btn`];
this[`${spd.name}Label`].text = `所需欢趣豆:${d ? d.price : 0}`; // this[`${spd.name}Label`].text = `所需欢趣豆:${d ? d.price : 0}`;
if (d && d.stock > 0) { // if (d && d.stock > 0) {
btn.source = 'shop_buy_png'; // btn.source = 'shop_buy_png';
btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.buyProp, this); // btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.buyProp, this);
} else { // } else {
if (btn.hasEventListener(egret.TouchEvent.TOUCH_TAP)) { // if (btn.hasEventListener(egret.TouchEvent.TOUCH_TAP)) {
btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.buyProp, this); // btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.buyProp, this);
} // }
btn.source = 'shop_none_png'; // btn.source = 'shop_none_png';
} // }
} // }
}); // });
} // }
protected initEvents() { protected initEvents() {
super.initEvents(); super.initEvents();
...@@ -315,7 +262,7 @@ export default class ShopScene extends Scene { ...@@ -315,7 +262,7 @@ export default class ShopScene extends Scene {
} }
public get skinKey() { public get skinKey() {
return 'ShopScene' return 'ExchangeScene'
} }
public get groupName() { public get groupName() {
...@@ -324,7 +271,7 @@ export default class ShopScene extends Scene { ...@@ -324,7 +271,7 @@ export default class ShopScene extends Scene {
} }
// 商店列表 // 商店列表
class ShopItem extends eui.ItemRenderer { class ExchangeItem extends eui.ItemRenderer {
public btn: eui.Group; public btn: eui.Group;
public icon: eui.Image; public icon: eui.Image;
public title: eui.Label; public title: eui.Label;
...@@ -348,7 +295,7 @@ class ShopItem extends eui.ItemRenderer { ...@@ -348,7 +295,7 @@ class ShopItem extends eui.ItemRenderer {
constructor() { constructor() {
super(); super();
this.skinName = getSkinPath('ShopItem'); this.skinName = getSkinPath('ExchangeItem');
} }
dataChanged() { dataChanged() {
...@@ -379,7 +326,7 @@ class ShopItem extends eui.ItemRenderer { ...@@ -379,7 +326,7 @@ class ShopItem extends eui.ItemRenderer {
.to({scaleX: 0.9, scaleY: 0.9}, 80, egret.Ease.quadIn) .to({scaleX: 0.9, scaleY: 0.9}, 80, egret.Ease.quadIn)
.to({scaleX: 1, scaleY: 1}, 80, egret.Ease.quadOut) .to({scaleX: 1, scaleY: 1}, 80, egret.Ease.quadOut)
.call(() => { .call(() => {
PanelCtrl.instance.show(ModuleTypes.EXCHANGE_PANEL, this.data); PanelCtrl.instance.show(ExchangePanel, this.data);
}); });
}, this); }, this);
} }
...@@ -404,7 +351,6 @@ class ShopItem extends eui.ItemRenderer { ...@@ -404,7 +351,6 @@ class ShopItem extends eui.ItemRenderer {
{text: '/' + spMap[v], style: {"textColor": 0x855933}} {text: '/' + spMap[v], style: {"textColor": 0x855933}}
]; ];
}); });
``
// 显示+号 // 显示+号
for (let i = 1; i < showList.length; i++) { for (let i = 1; i < showList.length; i++) {
this[`add${i}`].visible = true; this[`add${i}`].visible = true;
......
...@@ -36,12 +36,24 @@ export function gotoRecord(): string { ...@@ -36,12 +36,24 @@ export function gotoRecord(): string {
return recordUrl; return recordUrl;
} }
/**
* 异步等待
* @param t 时间 ms
*/
export function waitAsync(t) {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, t);
});
}
/** /**
* 预加载资源 很tm有用 * 预加载资源 很tm有用
* @param groups 资源组 * @param groups 资源组
*/ */
const duration = 1500; const duration = 1500;
export function preLoadRes(...groups): void { export function preLoadRes(...groups): void {
const tw = Tween.get(egret); const tw = Tween.get(egret);
for (let i = 0; i < groups.length; i++) { for (let i = 0; i < groups.length; i++) {
......
...@@ -9,7 +9,7 @@ const videoItems = {}; ...@@ -9,7 +9,7 @@ const videoItems = {};
const parser = new window["SVGA"].Parser(); const parser = new window["SVGA"].Parser();
const EgretMovieClip = window["SVGA"].EgretMovieClip; const EgretMovieClip = window["SVGA"].EgretMovieClip;
export const loadSvga = async (url: string, parent?: egret.DisplayObjectContainer): Promise<MovieClip> => { export const loadSvga = async (url: string, parent?: egret.DisplayObjectContainer): Promise<MovieClip> => {
const getMv = (videoItem) => { const getMv = (videoItem): MovieClip => {
const mv = new EgretMovieClip(videoItem); const mv = new EgretMovieClip(videoItem);
mv.gotoAndPlay(1, true); mv.gotoAndPlay(1, true);
if (parent) parent.addChild(mv); if (parent) parent.addChild(mv);
......
...@@ -49,14 +49,14 @@ export default class PanelCtrl { ...@@ -49,14 +49,14 @@ export default class PanelCtrl {
* @param type 类型 * @param type 类型
* @param data 数据 * @param data 数据
*/ */
public show(type: ModuleTypes | IPanel, data?) { public show(type: ModuleTypes | IPanel, data?, mask = true) {
if (this._current) { if (this._current) {
this._current.destroy(); /// TODO 不知道谁干的,没写这句导致事件清除不完善!自定义事件起冲突 this._current.destroy(); /// TODO 不知道谁干的,没写这句导致事件清除不完善!自定义事件起冲突
this.remove(this._current, true); this.remove(this._current, true);
this._current = null; this._current = null;
} }
this._parent.visible = true; this._parent.visible = true;
this.addMask(); mask && this.addMask();
let panel = null; let panel = null;
...@@ -74,7 +74,7 @@ export default class PanelCtrl { ...@@ -74,7 +74,7 @@ export default class PanelCtrl {
this._current = panel; this._current = panel;
this.add(panel); this.add(panel);
// panel.visible = false; /// TODO 不知道谁干的,有什么用? // panel.visible = false; /// TODO 不知道谁干的,有什么用?
panel.onShowAnim(); // 自定义显示动画 // panel.onShowAnim(); // 自定义显示动画 /// TODO 2020.12.18 放到 Panel -> onSkinComplete 即皮肤加载完成,此时可以获得弹窗皮肤的宽高,做动画更方便
return panel; return panel;
} }
......
...@@ -77,7 +77,7 @@ export default class TopLayerCtrl { ...@@ -77,7 +77,7 @@ export default class TopLayerCtrl {
private add(panel: Panel) { private add(panel: Panel) {
this._parent.addChild(panel); this._parent.addChild(panel);
panel.onShowAnim(); // panel.onShowAnim();
panel.addEventListener('onDestroy', this.onPanelHide, this); panel.addEventListener('onDestroy', this.onPanelHide, this);
} }
......
...@@ -10,7 +10,7 @@ import SellRecord from "../Panels/SellRecord"; ...@@ -10,7 +10,7 @@ import SellRecord from "../Panels/SellRecord";
import SellPanel from "../Panels/SellPanel"; import SellPanel from "../Panels/SellPanel";
import SelledPanel from "../Panels/SelledPanel"; import SelledPanel from "../Panels/SelledPanel";
import ShopScene from "../Scenes/ShopScene/ShopScene"; import ShopScene from "../Scenes/ShopScene/ShopScene";
import ShopBuyPanel from "../Panels/ShopBuyPanel"; import ExchangeBuyPanel from "../Panels/ExchangeBuyPanel";
import RoomScene from "../Scenes/RoomScene/RoomScene"; import RoomScene from "../Scenes/RoomScene/RoomScene";
import MedalsPanel from "../Panels/MedalsPanel"; import MedalsPanel from "../Panels/MedalsPanel";
import ExchangePanel from "../Panels/ExchangePanel"; import ExchangePanel from "../Panels/ExchangePanel";
...@@ -30,7 +30,7 @@ let Panels = [ ...@@ -30,7 +30,7 @@ let Panels = [
[ModuleTypes.RULE_PANEL, RulePanel], [ModuleTypes.RULE_PANEL, RulePanel],
[ModuleTypes.TASK_PANEL, TaskPanel], [ModuleTypes.TASK_PANEL, TaskPanel],
[ModuleTypes.WAREHOUSE_PANEL, WareHousePanel], [ModuleTypes.WAREHOUSE_PANEL, WareHousePanel],
[ModuleTypes.SHOP_BUY_PANEL, ShopBuyPanel], [ModuleTypes.SHOP_BUY_PANEL, ExchangeBuyPanel],
[ModuleTypes.MEDALS_PANEL, MedalsPanel], [ModuleTypes.MEDALS_PANEL, MedalsPanel],
[ModuleTypes.MEDAL_PANEL, MedalPanel], [ModuleTypes.MEDAL_PANEL, MedalPanel],
[ModuleTypes.EXCHANGE_PANEL, ExchangePanel], [ModuleTypes.EXCHANGE_PANEL, ExchangePanel],
......
...@@ -64,6 +64,7 @@ export default class Panel extends ComponentBase implements IPanel{ ...@@ -64,6 +64,7 @@ export default class Panel extends ComponentBase implements IPanel{
protected onSkinComplete() { protected onSkinComplete() {
super.onSkinComplete(); super.onSkinComplete();
this.onShowAnim();
Loading.instace.hide(); Loading.instace.hide();
} }
......
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