Commit ff65b3cf authored by Edwise's avatar Edwise 🍷

联调版本,修改大量

parent bb214c43
No preview for this file type
...@@ -417,27 +417,32 @@ var RES; ...@@ -417,27 +417,32 @@ var RES;
}; };
ResourceConfig.prototype.getResourceWithSubkey = function (key, shouldNotBeNull) { ResourceConfig.prototype.getResourceWithSubkey = function (key, shouldNotBeNull) {
key = this.getKeyByAlias(key); key = this.getKeyByAlias(key);
var index = key.indexOf("#"); try{
var subkey = ""; var index = key.indexOf("#");
if (index >= 0) { var subkey = "";
subkey = key.substr(index + 1); if (index >= 0) {
key = key.substr(0, index); subkey = key.substr(index + 1);
} key = key.substr(0, index);
var r = this.getResource(key); }
if (!r) { var r = this.getResource(key);
if (shouldNotBeNull) { if (!r) {
var msg = subkey ? key + "#" + subkey : key; if (shouldNotBeNull) {
throw new RES.ResourceManagerError(2006, msg); var msg = subkey ? key + "#" + subkey : key;
throw new RES.ResourceManagerError(2006, msg);
}
else {
return null;
}
} }
else { else {
return null; return {
r: r, key: key, subkey: subkey
};
} }
}catch(e){
console.warn('解析失败啦----》》',e,key,shouldNotBeNull)
} }
else {
return {
r: r, key: key, subkey: subkey
};
}
}; };
ResourceConfig.prototype.getKeyByAlias = function (aliasName) { ResourceConfig.prototype.getKeyByAlias = function (aliasName) {
if (this.config.alias[aliasName]) { if (this.config.alias[aliasName]) {
......
No preview for this file type
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"index_plant","version":5,"files":["../assets/index_scene/planting/篱笆.png","../assets/index_scene/planting/plant_land_active.png","../assets/index_scene/planting/plant_land_animal.png","../assets/index_scene/planting/plant_land_none.png","../assets/index_scene/planting/plant_land_plant.png","../assets/index_scene/planting/食槽.png","../assets/index_scene/planting/option/feed.png","../assets/index_scene/planting/option/hand.png","../assets/index_scene/planting/option/option_chicken.png","../assets/index_scene/planting/option/option_panel.png","../assets/index_scene/planting/option/option_wheat.png","../assets/index_scene/planting/option/water.png","../assets/index_scene/planting/麦粉.png","../assets/index_scene/planting/鸡蛋.png","../assets/index_scene/planting/option/option_cattle.png","../assets/common/light.png","../assets/index_scene/planting/玉米.png","../assets/index_scene/planting/牛奶.png","../assets/index_scene/planting/option/option_corn.png","../assets/index_scene/planting/土豆.png","../assets/index_scene/planting/核桃.png","../assets/index_scene/planting/option/免费邮寄到家.png","../assets/index_scene/planting/option/option_walnut.png","../assets/index_scene/planting/option/option_potato.png","../assets/index_scene/planting/plant_land_lock.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"index_plant","version":5,"files":["../assets/index_scene/planting/篱笆.png","../assets/index_scene/planting/plant_land_active.png","../assets/index_scene/planting/plant_land_animal.png","../assets/index_scene/planting/plant_land_none.png","../assets/index_scene/planting/plant_land_plant.png","../assets/index_scene/planting/食槽.png","../assets/index_scene/planting/option/feed.png","../assets/index_scene/planting/option/hand.png","../assets/index_scene/planting/option/option_chicken.png","../assets/index_scene/planting/option/option_panel.png","../assets/index_scene/planting/option/option_wheat.png","../assets/index_scene/planting/option/water.png","../assets/index_scene/planting/麦粉.png","../assets/index_scene/planting/鸡蛋.png","../assets/index_scene/planting/option/option_cattle.png","../assets/common/light.png","../assets/index_scene/planting/玉米.png","../assets/index_scene/planting/牛奶.png","../assets/index_scene/planting/option/option_corn.png","../assets/index_scene/planting/土豆.png","../assets/index_scene/planting/核桃.png","../assets/index_scene/planting/option/免费邮寄到家.png","../assets/index_scene/planting/option/option_walnut.png","../assets/index_scene/planting/option/option_potato.png","../assets/index_scene/planting/plant_land_lock.png","../assets/index_scene/planting/option/option_papaya.png","../assets/index_scene/planting/option/option_apple.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/index_scene/planting/option/option_left.png","../assets/index_scene/planting/option/option_right.png","../assets/index_scene/planting/option/option_scrollbar.png","../assets/exchange_panel/ex_panda.png","../assets/exchange_panel/ex_buybtn.png","../assets/exchange_panel/ex_close.png","../assets/index_scene/hotballoon.png","../assets/index_scene/ui/道具数量框.png","../assets/index_scene/ui/光线.png","../assets/index_scene/ui/水_半.png","../assets/index_scene/ui/水_空.png","../assets/index_scene/ui/水_满.png","../assets/index_scene/ui/饲料_半.png","../assets/index_scene/ui/饲料_空.png","../assets/index_scene/ui/饲料_满.png","../assets/exchanged_panel/roalightimg.png","../assets/exchanged_panel/closebtn.png","../assets/exchanged_panel/exd_fail_bg.png","../assets/exchanged_panel/iknowbtn.png","../assets/exchanged_panel/lightdotimg.png","../assets/exchanged_panel/roalightbg.png","../assets/exchange/奖品1.png","../assets/exchange/我要兑换按钮.png","../assets/exchange/奖品1.png","../assets/exchange/我要兑换按钮.png","../assets/exchange_panel/ex_buybtn.png","../assets/exchange_panel/ex_close.png","../assets/exchange_panel/ex_panda.png","../assets/exchanged_panel/closebtn.png","../assets/exchanged_panel/exd_fail_bg.png","../assets/exchanged_panel/iknowbtn.png","../assets/exchanged_panel/lightdotimg.png","../assets/exchanged_panel/roalightbg.png","../assets/exchanged_panel/roalightimg.png","../assets/index_scene/hotballoon.png","../assets/index_scene/planting/option/option_left.png","../assets/index_scene/planting/option/option_right.png","../assets/index_scene/planting/option/option_scrollbar.png","../assets/rule_panel/规则背景.png","../assets/rule_panel/规则关闭.png","../assets/introduce_panel/introduce_bg_new.png","../assets/introduce_panel/introduce_btn_close.png","../assets/introduce_panel/introduce_btn_new.png","../assets/shop/shopPanel_close.png","../assets/shop/shop_btn_-.png","../assets/shop/shop_btn_+.png","../assets/shop/shop_item_bg_big.png","../assets/shop/shop_item_cntBg.png","../assets/common/prop_apple.png","../assets/common/prop_papaya.png","../assets/shop/shopBuy_close_btn.png","../assets/warehouse_panel/warehouse_close_btn.png","../assets/warehouse_panel/papaya_bg.png","../assets/warehouse_panel/apple_bg.png","../assets/warehouse_panel/sell_panel/sellOutLine.png","../assets/warehouse_panel/sell_panel/sell_+_en.png","../assets/warehouse_panel/sell_panel/sell_-_en.png","../assets/task_panel/task_close_btn.png","../assets/task_panel/浇水.png","../assets/task_panel/饲料.png","../assets/task_panel/task_brn_bg_dis.png","../assets/task_panel/欢趣竞猜 icon.png","../assets/task_panel/趣赶集 icon.png","../assets/newUser_panel/newUserCloseBtn.png","../assets/noFeed_panel/noFeed_bg.png","../assets/noFeed_panel/noFeed_sr_btn.png","../assets/noWater_panel/noWater_btn.png","../assets/noWater_panel/noWater_bg.png","../assets/oldUser_panel/oldUserClose.png","../assets/warehouse_panel/sell_panel/sellTitle_apple.png","../assets/warehouse_panel/sell_panel/sellTitle_papaya.png","../assets/introduce_panel/introduce_apple.png","../assets/introduce_panel/introduce_papaya.png","../assets/index_scene/横幅.png","../assets/index_scene/index_liba.png","../assets/index_scene/进度条_ed.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/index_scene/planting/option/option_left.png","../assets/index_scene/planting/option/option_right.png","../assets/index_scene/planting/option/option_scrollbar.png","../assets/exchange_panel/ex_panda.png","../assets/exchange_panel/ex_buybtn.png","../assets/exchange_panel/ex_close.png","../assets/index_scene/hotballoon.png","../assets/index_scene/ui/道具数量框.png","../assets/index_scene/ui/光线.png","../assets/index_scene/ui/水_半.png","../assets/index_scene/ui/水_空.png","../assets/index_scene/ui/水_满.png","../assets/index_scene/ui/饲料_半.png","../assets/index_scene/ui/饲料_空.png","../assets/index_scene/ui/饲料_满.png","../assets/exchanged_panel/roalightimg.png","../assets/exchanged_panel/closebtn.png","../assets/exchanged_panel/exd_fail_bg.png","../assets/exchanged_panel/iknowbtn.png","../assets/exchanged_panel/lightdotimg.png","../assets/exchanged_panel/roalightbg.png","../assets/exchange/奖品1.png","../assets/exchange/我要兑换按钮.png","../assets/exchange/奖品1.png","../assets/exchange/我要兑换按钮.png","../assets/exchange_panel/ex_buybtn.png","../assets/exchange_panel/ex_close.png","../assets/exchange_panel/ex_panda.png","../assets/exchanged_panel/closebtn.png","../assets/exchanged_panel/exd_fail_bg.png","../assets/exchanged_panel/iknowbtn.png","../assets/exchanged_panel/lightdotimg.png","../assets/exchanged_panel/roalightbg.png","../assets/exchanged_panel/roalightimg.png","../assets/index_scene/hotballoon.png","../assets/index_scene/planting/option/option_left.png","../assets/index_scene/planting/option/option_right.png","../assets/index_scene/planting/option/option_scrollbar.png","../assets/rule_panel/规则背景.png","../assets/rule_panel/规则关闭.png","../assets/introduce_panel/introduce_bg_new.png","../assets/introduce_panel/introduce_btn_close.png","../assets/introduce_panel/introduce_btn_new.png","../assets/shop/shopPanel_close.png","../assets/shop/shop_btn_-.png","../assets/shop/shop_btn_+.png","../assets/shop/shop_item_bg_big.png","../assets/shop/shop_item_cntBg.png","../assets/common/prop_apple.png","../assets/common/prop_papaya.png","../assets/shop/shopBuy_close_btn.png","../assets/warehouse_panel/warehouse_close_btn.png","../assets/warehouse_panel/papaya_bg.png","../assets/warehouse_panel/apple_bg.png","../assets/warehouse_panel/sell_panel/sellOutLine.png","../assets/warehouse_panel/sell_panel/sell_+_en.png","../assets/warehouse_panel/sell_panel/sell_-_en.png","../assets/task_panel/task_close_btn.png","../assets/task_panel/task_brn_bg_dis.png","../assets/task_panel/欢趣竞猜 icon.png","../assets/task_panel/趣赶集 icon.png","../assets/newUser_panel/newUserCloseBtn.png","../assets/noFeed_panel/noFeed_bg.png","../assets/noFeed_panel/noFeed_sr_btn.png","../assets/noWater_panel/noWater_btn.png","../assets/noWater_panel/noWater_bg.png","../assets/oldUser_panel/oldUserClose.png","../assets/warehouse_panel/sell_panel/sellTitle_apple.png","../assets/warehouse_panel/sell_panel/sellTitle_papaya.png","../assets/introduce_panel/introduce_apple.png","../assets/introduce_panel/introduce_papaya.png","../assets/index_scene/横幅.png","../assets/index_scene/index_liba.png","../assets/index_scene/进度条_ed.png","../assets/gameGroup_panel/gameGroup_close.png","../assets/index_scene/planting/木瓜.png","../assets/index_scene/planting/苹果.png","../assets/task_panel/饲料_new.png","../assets/task_panel/浇水_new.png"]}
\ No newline at end of file \ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"name": "main_ui" "name": "main_ui"
}, },
{ {
"keys": "篱笆_png,plant_land_active_png,plant_land_animal_png,plant_land_none_png,plant_land_plant_png,食槽_png,_DS_Store,feed_png,hand_png,option_chicken_png,option_panel_png,option_wheat_png,water_png,麦粉_png,鸡蛋_png,option_cattle_png,light_png,玉米_png,牛奶_png,option_corn_png,土豆_png,核桃_png,免费邮寄到家_png,option_walnut_png,option_potato_png,plant_land_lock_png", "keys": "篱笆_png,plant_land_active_png,plant_land_animal_png,plant_land_none_png,plant_land_plant_png,食槽_png,_DS_Store,feed_png,hand_png,option_chicken_png,option_panel_png,option_wheat_png,water_png,麦粉_png,鸡蛋_png,option_cattle_png,light_png,玉米_png,牛奶_png,option_corn_png,土豆_png,核桃_png,免费邮寄到家_png,option_walnut_png,option_potato_png,plant_land_lock_png,option_papaya_png,option_apple_png",
"name": "index_plant" "name": "index_plant"
}, },
{ {
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"name": "shop" "name": "shop"
}, },
{ {
"keys": "option_left_png,option_right_png,option_scrollbar_png,ex_panda_png,ex_buybtn_png,ex_close_png,hotballoon_png,道具数量框_png,光线_png,水_半_png,水_空_png,水_满_png,饲料_半_png,饲料_空_png,饲料_满_png,roalightimg_png,closebtn_png,exd_fail_bg_png,iknowbtn_png,lightdotimg_png,roalightbg_png,奖品1_png,我要兑换按钮_png,奖品12_png,我要兑换按钮2_png,ex_buybtn2_png,ex_close2_png,ex_panda2_png,closebtn2_png,exd_fail_bg2_png,iknowbtn2_png,lightdotimg2_png,roalightbg2_png,roalightimg2_png,hotballoon2_png,option_left2_png,option_right2_png,option_scrollbar2_png,规则背景_png,规则关闭_png,introduce_bg_new_png,introduce_btn_close_png,introduce_btn_new_png,shopPanel_close_png,shop_btn_-_png,shop_btn_+_png,shop_item_bg_big_png,shop_item_cntBg_png,prop_apple_png,prop_papaya_png,shopBuy_close_btn_png,warehouse_close_btn_png,papaya_bg_png,apple_bg_png,sellOutLine_png,sell_+_en_png,sell_-_en_png,task_close_btn_png,浇水3_png,饲料2_png,task_brn_bg_dis_png,欢趣竞猜 icon_png,趣赶集 icon_png,newUserCloseBtn_png,noFeed_bg_png,noFeed_sr_btn_png,noWater_btn_png,noWater_bg_png,oldUserClose_png,sellTitle_apple_png,sellTitle_papaya_png,introduce_apple_png,introduce_papaya_png,横幅_png,index_liba_png,进度条_ed_png", "keys": "option_left_png,option_right_png,option_scrollbar_png,ex_panda_png,ex_buybtn_png,ex_close_png,hotballoon_png,道具数量框_png,光线_png,水_半_png,水_空_png,水_满_png,饲料_半_png,饲料_空_png,饲料_满_png,roalightimg_png,closebtn_png,exd_fail_bg_png,iknowbtn_png,lightdotimg_png,roalightbg_png,奖品1_png,我要兑换按钮_png,奖品12_png,我要兑换按钮2_png,ex_buybtn2_png,ex_close2_png,ex_panda2_png,closebtn2_png,exd_fail_bg2_png,iknowbtn2_png,lightdotimg2_png,roalightbg2_png,roalightimg2_png,hotballoon2_png,option_left2_png,option_right2_png,option_scrollbar2_png,规则背景_png,规则关闭_png,introduce_bg_new_png,introduce_btn_close_png,introduce_btn_new_png,shopPanel_close_png,shop_btn_-_png,shop_btn_+_png,shop_item_bg_big_png,shop_item_cntBg_png,prop_apple_png,prop_papaya_png,shopBuy_close_btn_png,warehouse_close_btn_png,papaya_bg_png,apple_bg_png,sellOutLine_png,sell_+_en_png,sell_-_en_png,task_close_btn_png,task_brn_bg_dis_png,欢趣竞猜 icon_png,趣赶集 icon_png,newUserCloseBtn_png,noFeed_bg_png,noFeed_sr_btn_png,noWater_btn_png,noWater_bg_png,oldUserClose_png,sellTitle_apple_png,sellTitle_papaya_png,introduce_apple_png,introduce_papaya_png,横幅_png,index_liba_png,进度条_ed_png,gameGroup_close_png,木瓜_png,苹果_png,饲料_new_png,浇水_new_png",
"name": "preload" "name": "preload"
} }
], ],
...@@ -1546,16 +1546,6 @@ ...@@ -1546,16 +1546,6 @@
"type": "image", "type": "image",
"name": "task_close_btn_png" "name": "task_close_btn_png"
}, },
{
"url": "assets/task_panel/浇水.png",
"type": "image",
"name": "浇水3_png"
},
{
"url": "assets/task_panel/饲料.png",
"type": "image",
"name": "饲料2_png"
},
{ {
"url": "assets/task_panel/task_brn_bg_dis.png", "url": "assets/task_panel/task_brn_bg_dis.png",
"type": "image", "type": "image",
...@@ -1645,6 +1635,31 @@ ...@@ -1645,6 +1635,31 @@
"name": "进度条_ed_png", "name": "进度条_ed_png",
"type": "image", "type": "image",
"url": "assets/index_scene/进度条_ed.png" "url": "assets/index_scene/进度条_ed.png"
},
{
"name": "gameGroup_close_png",
"type": "image",
"url": "assets/gameGroup_panel/gameGroup_close.png"
},
{
"name": "木瓜_png",
"type": "image",
"url": "assets/index_scene/planting/木瓜.png"
},
{
"name": "苹果_png",
"type": "image",
"url": "assets/index_scene/planting/苹果.png"
},
{
"name": "饲料_new_png",
"type": "image",
"url": "assets/task_panel/饲料_new.png"
},
{
"name": "浇水_new_png",
"type": "image",
"url": "assets/task_panel/浇水_new.png"
} }
] ]
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?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: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 source="gameGroup_bg_png" y="67" x="0"/>
<e:Image id="closeBtn" source="closeBtn_png" x="630" y="0"/> <e:Image id="closeBtn" x="655" y="43" source="gameGroup_close_png"/>
<e:Scroller width="750" height="510" y="308" anchorOffsetY="0" horizontalCenter="0"> <e:Scroller width="750" height="510" y="216" anchorOffsetY="0" horizontalCenter="0" locked="true">
<e:Group> <e:Group>
<e:Image id="planeBtn" source="gameGroup_plane_png" y="3.5" horizontalCenter="0"/> <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:Image id="clearBtn" source="gameGroup_clear_png" y="259" horizontalCenter="0"/>
......
...@@ -4,20 +4,20 @@ ...@@ -4,20 +4,20 @@
<e:Group id="uiLayer" left="0" right="0" horizontalCenter="0" touchChildren="true" touchEnabled="false" top="0" height="1624"> <e:Group id="uiLayer" left="0" right="0" horizontalCenter="0" touchChildren="true" touchEnabled="false" top="0" height="1624">
<e:Rect fillColor="0xd82020" width="750" height="1624" y="0" visible="false"/> <e:Rect fillColor="0xd82020" width="750" height="1624" y="0" visible="false"/>
<e:Group id="propPanel" width="182" height="198" right="0" verticalCenter="452" touchChildren="true" touchEnabled="false"> <e:Group id="propPanel" width="182" height="198" right="0" verticalCenter="452" touchChildren="true" touchEnabled="false">
<e:Group id="speedGroup" y="-80" width="171" height="62" right="0"> <e:Group id="speedGroup" y="-80" width="171" height="62" horizontalCenter="0">
<e:Image source="道具数量框_png" y="50" x="24.72" scale9Grid="11,4,73,26" width="128"/> <e:Image id="speedNumBg" source="道具数量框_png" y="50" scale9Grid="11,4,73,26" width="128" horizontalCenter="0"/>
<e:Image source="加速卡_png" x="49" y="-14" touchEnabled="false"/> <e:Image id="speedIcon" source="加速卡_png" y="-14" touchEnabled="false" horizontalCenter="0"/>
<e:Label id="speedNum" text="" size="26" scaleX="1" scaleY="1" anchorOffsetX="0" width="190" anchorOffsetY="0" height="34" verticalAlign="middle" touchEnabled="false" textAlign="center" y="54" x="-3" textColor="0xffffff"/> <e:Label id="speedNum" text="" size="26" scaleX="1" scaleY="1" anchorOffsetX="0" width="190" anchorOffsetY="0" height="34" verticalAlign="middle" touchEnabled="false" textAlign="center" y="54" textColor="0xffffff" horizontalCenter="0"/>
</e:Group> </e:Group>
<e:Group id="foodGroup" y="25" width="170" height="63" touchEnabled="true" touchChildren="false" x="11"> <e:Group id="foodGroup" y="25" width="170" height="63" touchEnabled="true" touchChildren="false" horizontalCenter="0">
<e:Image source="道具数量框_png" y="50" x="24.72" scale9Grid="11,4,73,26" width="128"/> <e:Image id="foodNumBg" source="道具数量框_png" y="50" scale9Grid="11,4,73,26" width="128" horizontalCenter="0"/>
<e:Image x="49" y="-14" source="饲料_满_png"/> <e:Image id="foodIcon" y="-14" source="饲料_满_png" horizontalCenter="0"/>
<e:Label id="foodNum" text="" size="26" scaleX="1" scaleY="1" anchorOffsetX="0" width="190" anchorOffsetY="0" height="34" verticalAlign="middle" x="-3" y="54" textAlign="center"/> <e:Label id="foodNum" text="" size="26" scaleX="1" scaleY="1" anchorOffsetX="0" width="190" anchorOffsetY="0" height="34" verticalAlign="middle" y="54" textAlign="center" horizontalCenter="0"/>
</e:Group> </e:Group>
<e:Group id="waterGroup" y="130" touchEnabled="true" touchChildren="false" x="11"> <e:Group id="waterGroup" y="130" touchEnabled="true" touchChildren="false" horizontalCenter="0">
<e:Image source="道具数量框_png" y="50" x="24.72" scale9Grid="11,4,73,26" width="128"/> <e:Image id="waterNumBg" source="道具数量框_png" y="50" scale9Grid="11,4,73,26" width="128" horizontalCenter="0"/>
<e:Image x="49" y="-14" source="水_空_png"/> <e:Image id="waterIcon" y="-14" source="水_空_png" horizontalCenter="0"/>
<e:Label id="waterNum" text="" size="26" scaleX="1" scaleY="1" anchorOffsetX="0" width="190" anchorOffsetY="0" height="34" verticalAlign="middle" x="-3" y="54" textAlign="center"/> <e:Label id="waterNum" text="" size="26" scaleX="1" scaleY="1" anchorOffsetX="0" width="190" anchorOffsetY="0" height="34" verticalAlign="middle" y="54" textAlign="center" horizontalCenter="0"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Group id="avatarPanel" x="26" width="278" height="81" anchorOffsetX="0" y="253"> <e:Group id="avatarPanel" x="26" width="278" height="81" anchorOffsetX="0" y="253">
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<e:Skin class="Land" width="339" height="165" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*"> <e:Skin class="Land" width="339" height="165" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<e:Image id="land" source="plant_land_none_png" touchEnabled="true" horizontalCenter="0" verticalCenter="0"/> <e:Image id="land" source="plant_land_none_png" touchEnabled="true" horizontalCenter="0" verticalCenter="0"/>
<e:Image id="fence" source="篱笆_png" width="362" touchEnabled="false" y="-70" x="-15"/> <e:Image id="fence" source="篱笆_png" width="362" touchEnabled="false" y="-70" x="-15"/>
<e:Image id="trough" source="食槽_png" touchEnabled="false" y="70" x="-15"/> <e:Image id="trough" touchEnabled="false" y="70" x="-15" source="食槽_png"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
<e:Label id="textKHD" text="可获得:" size="24" left="178" textColor="0xff5b00" y="100"/> <e:Label id="textKHD" text="可获得:" size="24" left="178" textColor="0xff5b00" y="100"/>
<e:Group id="prizeGroup" x="265" y="93"> <e:Group id="prizeGroup" x="265" y="93">
<e:Group id="foodGroup" y="0" x="0"> <e:Group id="foodGroup" y="0" x="0">
<e:Image y="0" left="0" source="饲料2_png"/> <e:Image y="0" left="0" source="饲料_new_png"/>
<e:Label id="textFood" text="×500" size="24" y="6" left="37" textColor="0xff5b00"/> <e:Label id="textFood" text="×500" size="24" y="6" left="37" textColor="0xff5b00"/>
</e:Group> </e:Group>
<e:Group id="waterGroup" x="90" y="2"> <e:Group id="waterGroup" x="90" y="2">
<e:Image y="0" left="0" source="浇水3_png"/> <e:Image y="0" left="0" source="浇水_new_png"/>
<e:Label id="textWater" text="×500" size="24" y="4.5" left="52" textColor="0xff5b00"/> <e:Label id="textWater" text="×500" size="24" y="4.5" left="52" textColor="0xff5b00"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Group id="btn" x="460" verticalCenter="-15"> <e:Group id="btn" x="460" verticalCenter="-15">
<e:Image id="btn_bg" source="task_brn_bg_png" x="0" y="0"/>
<e:Image id="btn_bg_dis" x="0" y="0" source="task_brn_bg_dis_png"/> <e:Image id="btn_bg_dis" x="0" y="0" source="task_brn_bg_dis_png"/>
<e:Image id="btn_bg" source="task_brn_bg_png" x="0" y="0"/>
<e:Label id="btn_label" text="去完成" horizontalCenter="0" verticalCenter="0" size="28"/> <e:Label id="btn_label" text="去完成" horizontalCenter="0" verticalCenter="0" size="28"/>
</e:Group> </e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -9,6 +9,7 @@ import TouchEvent = egret.TouchEvent; ...@@ -9,6 +9,7 @@ import TouchEvent = egret.TouchEvent;
import {getlogItem} from "../comm/getlogItem"; import {getlogItem} from "../comm/getlogItem";
import { G_GetHomeDataByKey, HOME } from "../Scenes/Home"; import { G_GetHomeDataByKey, HOME } from "../Scenes/Home";
import { showToast } from "../comm/UtilsConst"; import { showToast } from "../comm/UtilsConst";
import { Tools } from "../Tools";
const propData = [ const propData = [
{ {
...@@ -330,7 +331,8 @@ class ShopItem extends Component { ...@@ -330,7 +331,8 @@ class ShopItem extends Component {
if(spIds.indexOf(spId)!=-1){ if(spIds.indexOf(spId)!=-1){
let spdata1 = G_GetHomeDataByKey(HOME.PROP); let spdata1 = G_GetHomeDataByKey(HOME.PROP);
let count = spdata1[spId]; let count = spdata1[spId];
if(count>=100){ let maxCount = Tools.frontInfo.data.spLimit;
if(count>=maxCount){
showToast("已达上限"); showToast("已达上限");
return; return;
} }
......
...@@ -118,7 +118,8 @@ class TaskItem extends ItemRenderer { ...@@ -118,7 +118,8 @@ class TaskItem extends ItemRenderer {
this.btn_label.text = (this.data.status == 0) ? window['taskUi'][this.data.id].btnLabel : '已领取'; this.btn_label.text = (this.data.status == 0) ? window['taskUi'][this.data.id].btnLabel : '已领取';
this.btn_label.textColor = (this.data.status == 0) ? 0xffffff : 0xffffff; this.btn_label.textColor = (this.data.status == 0) ? 0xffffff : 0xffffff;
this.btn_bg.visible = (this.data.status == 0); this.btn_bg.visible = (this.data.status == 0);
this.btn_bg_dis.visible = (this.data.status != 0); this.btn_bg_dis.visible = !(this.data.status == 0);
console.log('当前按钮--》',this.data.id,this.data.status,window['taskUi'][this.data.id].btnLabel,this.btn_bg.visible,this.btn_bg_dis.visible)
let _f = () => { let _f = () => {
if(this.data.spFood1RewardNum||this.data.spFood2RewardNum){ if(this.data.spFood1RewardNum||this.data.spFood2RewardNum){
......
...@@ -144,8 +144,9 @@ export default class MainScene extends Scene { ...@@ -144,8 +144,9 @@ export default class MainScene extends Scene {
/**修改广告位 */ /**修改广告位 */
private changePoster() { private changePoster() {
let balloonUrl = Tools.frontInfo.data.balloonUrl; let balloonUrl = Tools.frontInfo.data.balloonUrl;
console.log('rgreg--->>',balloonUrl);
const { body, link, bodyType } = balloonUrl; const { body, link, bodyType } =JSON.parse(balloonUrl);
console.log('rgreg--->>',balloonUrl,body, link, bodyType);
if(bodyType == 1){ if(bodyType == 1){
this.posterLabel.text = body; this.posterLabel.text = body;
this.posterGroup.visible = true; this.posterGroup.visible = true;
...@@ -266,7 +267,7 @@ export default class MainScene extends Scene { ...@@ -266,7 +267,7 @@ export default class MainScene extends Scene {
if (Tools.frontInfo && Tools.frontInfo.data && Tools.frontInfo.data.balloonUrl) { if (Tools.frontInfo && Tools.frontInfo.data && Tools.frontInfo.data.balloonUrl) {
let balloonUrl = Tools.frontInfo.data.balloonUrl; let balloonUrl = Tools.frontInfo.data.balloonUrl;
console.log("热气球广告位---》》", balloonUrl) console.log("热气球广告位---》》", balloonUrl)
const { body, link, bodyType } = balloonUrl; const { body, link, bodyType } = JSON.parse(balloonUrl);
if(link&&link.length>4){ if(link&&link.length>4){
window.location.href = link; window.location.href = link;
} }
......
...@@ -26,9 +26,18 @@ import { wait } from "../../comm/GameConst"; ...@@ -26,9 +26,18 @@ import { wait } from "../../comm/GameConst";
import Event = egret.Event; import Event = egret.Event;
export let propData = { export let propData = {
sp_food_1: { name: 'food', }, sp_food_1: {
sp_food_2: { name: 'water', }, name: 'food',
sp_prop_1: { name: 'speed', }, key:'饲料',
},
sp_food_2: {
name: 'water',
key:'水'
},
sp_prop_1: {
name: 'speed',
key:'加速卡'
},
}; };
export default class MainUI extends ComponentBase { export default class MainUI extends ComponentBase {
...@@ -63,6 +72,9 @@ export default class MainUI extends ComponentBase { ...@@ -63,6 +72,9 @@ export default class MainUI extends ComponentBase {
private tip1; private tip1;
private tip2; private tip2;
/**需要根据满仓值改变图片的道具 */
public propImgByState = ['sp_food_1', 'sp_food_2']
constructor() { constructor() {
super(); super();
} }
...@@ -242,8 +254,11 @@ export default class MainUI extends ComponentBase { ...@@ -242,8 +254,11 @@ export default class MainUI extends ComponentBase {
public setPropInfoByBI() { public setPropInfoByBI() {
const data = G_GetHomeDataByKey(HOME.PROP); const data = G_GetHomeDataByKey(HOME.PROP);
for (let k in propData) { for (let k in propData) {
let maxcount = 100; let maxcount = Tools.frontInfo.data.spLimit || 100;
let textflow = []; let textflow = [];
let textLabel = this[`${propData[k].name}Num`];
let textBg = this[`${propData[k].name}NumBg`];
let propIcon = this[`${propData[k].name}Icon`] as eui.Image;
if (data[k] > maxcount) { if (data[k] > maxcount) {
textflow = [ textflow = [
{ text: maxcount + "/", style: { textColor: 0xFFFFFF } }, { text: maxcount + "/", style: { textColor: 0xFFFFFF } },
...@@ -254,8 +269,15 @@ export default class MainUI extends ComponentBase { ...@@ -254,8 +269,15 @@ export default class MainUI extends ComponentBase {
{ text: data[k] + "/" + maxcount, style: { textColor: 0xFFFFFF } }, { text: data[k] + "/" + maxcount, style: { textColor: 0xFFFFFF } },
]; ];
} }
this[`${propData[k].name}Num`].textFlow = textflow; if (this.propImgByState.indexOf(k) >= 0) {
// this[`${propData[k].name}Num`].text = '× ' + data[k]; let typeStr = this.getIconState(data[k], maxcount);
propIcon.source = `${propData[k].key}_${typeStr}_png`
}
textLabel.textFlow = textflow;
if ((textLabel.textWidth + 20) > textBg.width)
textBg.width = textLabel.textWidth + 20;
// textLabel.text = '× ' + data[k];
console.log('每一种的文本宽度--->>', textLabel.textWidth)
DataManager.ins.updateData(propData[k].name, data[k]); DataManager.ins.updateData(propData[k].name, data[k]);
} }
this[`${propData['sp_prop_1'].name}Group`].visible = data['sp_prop_1'] > 0; this[`${propData['sp_prop_1'].name}Group`].visible = data['sp_prop_1'] > 0;
...@@ -264,6 +286,16 @@ export default class MainUI extends ComponentBase { ...@@ -264,6 +286,16 @@ export default class MainUI extends ComponentBase {
this.userGold.text = `${unitName}${G_GetHomeDataByKey(HOME.GOLD)}`; this.userGold.text = `${unitName}${G_GetHomeDataByKey(HOME.GOLD)}`;
} }
/** 根据道具的当前值与满仓值来计算当前道具的展示 */
getIconState(curCnt, maxCnt) {
let step1 = Math.floor(maxCnt*0.2);
let step2 = Math.floor(maxCnt*0.8);
if(curCnt<=step1) return '空';
if(curCnt>step1&&curCnt<=step2) return '半'
if(curCnt>step2) return '满'
return '空'
}
public setPropInfo() { public setPropInfo() {
this.setPropInfoByBI(); this.setPropInfoByBI();
......
...@@ -3,12 +3,9 @@ ...@@ -3,12 +3,9 @@
"message": "", "message": "",
"code": "", "code": "",
"data": { "data": {
"balloonUrl": { "balloonUrl": "{\"body\":\"123\",\"link\":\"baidu.com\",\"bodyType\":1}",
"body":"1234",
"link":"www.bilibli.com",
"bodyType":1
},
"dxqRule": "1", "dxqRule": "1",
"xxlRule": "111" "xxlRule": "111",
"spLimit":200
} }
} }
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
"feedNum": 30, "feedNum": 30,
"id": 3, "id": 3,
"level": 3, "level": 3,
"petId": 7, "petId": 8,
"lock": false "lock": false
}, },
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"id": 1, "id": 1,
"spFood1RewardNum": 50, "spFood1RewardNum": 50,
"spFood2RewardNum": 60, "spFood2RewardNum": 60,
"status": 1, "status": 0,
"type": 0 "type": 0
}, },
{ {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"sp_1": 8, "sp_1": 8,
"sp_achv_well_breeder": 0, "sp_achv_well_breeder": 0,
"sp_breed_animal": 52, "sp_breed_animal": 52,
"sp_food_2": 162, "sp_food_2": 30000,
"sp_prop_1": 2, "sp_prop_1": 2,
"sp_food_1": 104, "sp_food_1": 104,
"sp_plant_vegetable": 204, "sp_plant_vegetable": 204,
......
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