Commit 6f304d76 authored by 邱旭's avatar 邱旭

1

parent 97f25710
No preview for this file type
This diff is collapsed.
No preview for this file type
No preview for this file type
......@@ -5,7 +5,7 @@
"name": "loading"
},
{
"keys": "closeBtn_png,light1_png,light_png,swap_light_png,common_-_en_png,common_+_en_png,common_+_dis_png,common_-_dis_png,prop_water_png,prop_speed_png,prop_food_png,prop_cattle_png,prop_wheat_png,prop_chicken_png,prop_corn_png,prop_potato_png,prop_walnut_png,medal_achv_advanced_farmer_0_png,medal_achv_advanced_farmer_png,medal_achv_excellent_farmer_0_png,medal_achv_internship_farmer_0_png,medal_achv_excellent_farmer_png,medal_achv_internship_farmer_png,medal_achv_well_breeder_0_png,medal_achv_well_breeder_png",
"keys": "closeBtn_png,light1_png,light_png,swap_light_png,common_-_en_png,common_+_en_png,common_+_dis_png,common_-_dis_png,prop_water_png,prop_speed_png,prop_food_png,prop_cattle_png,prop_wheat_png,prop_chicken_png,prop_corn_png,prop_potato_png,prop_walnut_png,medal_achv_advanced_farmer_0_png,medal_achv_advanced_farmer_png,medal_achv_excellent_farmer_0_png,medal_achv_internship_farmer_0_png,medal_achv_excellent_farmer_png,medal_achv_internship_farmer_png,medal_achv_well_breeder_0_png,medal_achv_well_breeder_png,itemTip_png",
"name": "common"
},
{
......@@ -1246,6 +1246,11 @@
"url": "assets/medals_panel/medal_wait_0.png",
"type": "image",
"name": "medal_wait_0_png"
},
{
"url": "assets/common/itemTip.png",
"type": "image",
"name": "itemTip_png"
}
]
}
\ No newline at end of file
......@@ -5,7 +5,6 @@
<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:Image id="recordBtn" source="兑换记录_png" verticalCenter="-330.5" horizontalCenter="-272"/>
<e:Group id="goodsGroup" width="541" height="740" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="-0.5" y="524" locked="true">
<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"/>
......@@ -22,6 +21,7 @@
</e:Group>
</e:Scroller>
</e:Group>
<e:Image id="recordBtn" source="兑换记录_png" verticalCenter="-330.5" horizontalCenter="-272"/>
<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>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="OptionPanel" width="596" height="400" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="option_panel_png" horizontalCenter="0" verticalCenter="0" alpha="0.8" top="0" bottom="0" right="0" left="0"/>
<e:Image id="chickBtn" source="option_chicken_png" x="112" anchorOffsetX="41" anchorOffsetY="56" bottom="235"/>
<e:Group id="chickBtn" x="23" y="35" touchChildren="false">
<e:Image source="免费邮寄到家_png" x="0" y="0"/>
<e:Image source="option_chicken_png" x="92" anchorOffsetX="41" anchorOffsetY="56" y="74"/>
</e:Group>
<e:Image id="cattleBtn" source="option_cattle_png" anchorOffsetX="48.5" anchorOffsetY="58.5" x="298" bottom="235"/>
<e:Image id="cornBtn" source="option_corn_png" x="460" anchorOffsetX="47.5" anchorOffsetY="65" bottom="235"/>
<e:Image id="wheatBtn" source="option_wheat_png" anchorOffsetX="43" anchorOffsetY="59" x="114" bottom="55"/>
<e:Image id="walnutBtn" anchorOffsetX="43" anchorOffsetY="59" source="option_walnut_png" horizontalCenter="155" verticalCenter="89"/>
<e:Group id="wheatBtn" x="23" y="204" touchChildren="false">
<e:Image source="免费邮寄到家_png" x="-4" y="-2"/>
<e:Image source="option_wheat_png" anchorOffsetX="43" anchorOffsetY="59" x="90.5" y="76"/>
</e:Group>
<e:Image id="walnutBtn" anchorOffsetX="43" anchorOffsetY="59" source="option_walnut_png" horizontalCenter="155" verticalCenter="89" locked="true"/>
<e:Image id="potatoBtn" anchorOffsetX="43" anchorOffsetY="59" source="option_potato_png" horizontalCenter="-4" verticalCenter="90"/>
</e:Skin>
\ No newline at end of file
......@@ -38,4 +38,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="tipImg" source="itemTip_png" x="23" y="14.25"/>
</e:Skin>
\ No newline at end of file
......@@ -4,4 +4,5 @@
<e:Label id="nameTxt" text="0" x="0" y="182" size="24" textAlign="center" anchorOffsetX="0" width="312" textColor="0x66492f"/>
<e:Image id="img" source="prop_food_png" left="29.5" top="22"/>
<e:Label id="tipTxt" text="数量:0" x="0" y="260" size="22" textAlign="center" anchorOffsetX="0" width="312" textColor="0x9a9a9a"/>
<e:Image id="tipImg" source="itemTip_png" x="23.3" y="14.8"/>
</e:Skin>
\ No newline at end of file
......@@ -50,7 +50,7 @@ const seedData = [
},
{
key: 'wheat',
name: '小麦',
name: '水稻',
spId: 'sp_seed_2',
price: 0,
stock: 0,
......@@ -241,6 +241,9 @@ class ShopItem extends Component {
public line: eui.Rect;
public propBuyBtn: eui.Button;
public tipImg:eui.Image;
private num: number = 0;
constructor(
......@@ -256,6 +259,8 @@ class ShopItem extends Component {
private initUi(data?) {
this.img.source = `prop_${data.key}_png`;
// chicken wheat
this.tipImg.visible = (data.key == 'chicken' || data.key == 'wheat');
this.nameTxt.text = data.name;
this.tipTxt.text = `购买价格:${data.price}欢趣豆`;
this.setNum(0);
......
......@@ -21,10 +21,10 @@ export const productData = {
total: 0,
item: null,
},
'sp_2': { // 麦粉
'sp_2': { // 大米
key: 'sp_2',
name: 'wheat',
nameLabel: '麦粉',
nameLabel: '大米',
numLabel: '袋',
price: 0,
total: 0,
......@@ -77,10 +77,10 @@ export const seedData = {
total: 0,
item: null,
},
'sp_seed_2': { // 麦粉
'sp_seed_2': { // 水稻
key: 'sp_seed_2',
name: 'wheat',
nameLabel: '小麦',
nameLabel: '水稻',
total: 0,
item: null,
},
......@@ -115,16 +115,16 @@ export const seedData = {
};
export default class WareHousePanel extends Panel {
public closeBtn:eui.Image;
public cropGroup:eui.Group;
public record_btn:eui.Image;
public cropNoneImg:eui.Image;
public crops:eui.Scroller;
public seedGroup:eui.Group;
public seedNoneImg:eui.Image;
public seeds:eui.Scroller;
public tableSeed:eui.Button;
public tableCrop:eui.Button;
public closeBtn: eui.Image;
public cropGroup: eui.Group;
public record_btn: eui.Image;
public cropNoneImg: eui.Image;
public crops: eui.Scroller;
public seedGroup: eui.Group;
public seedNoneImg: eui.Image;
public seeds: eui.Scroller;
public tableSeed: eui.Button;
public tableCrop: eui.Button;
public get skinKey() {
return 'WareHouse'
......@@ -388,6 +388,7 @@ class WareHouseSeed extends Component {
public nameTxt: eui.Label;
public img: eui.Image;
public tipTxt: eui.Label;
public tipImg: eui.Image;
constructor(
private data?
......@@ -401,9 +402,10 @@ class WareHouseSeed extends Component {
}
private initUi(data?) {
console.log(data);
this.img.source = `prop_${data.name}_png`;
this.nameTxt.text = data.nameLabel;
this.tipImg.visible = (data.name == 'chicken' || data.name == 'wheat');
this.updateUI();
}
......
......@@ -10,7 +10,7 @@ let HomeData = {
},
product: {
sp_1: 0, // 鸡蛋
sp_2: 0, // 小麦粉
sp_2: 0, // 水稻
sp_3: 0, // 玉米
sp_4: 0, // 牛奶
sp_5: 0, // 土豆
......
......@@ -33,16 +33,16 @@ export let petData = {
catherImg: '鸡蛋',
introduce: '24小时即可长成 每八小时喂食一次 长成后预计可得4个鸡蛋',
},
[CROP_TYPE.WHEAT]: { // 小麦
[CROP_TYPE.WHEAT]: { // 水稻
key: 'wheat',
name: '小麦',
name: '水稻',
type: 'plant',
pos: [-30, -142],
propId: 'sp_food_2',
optionSvga: 'ready_water',
option: 'water',
catherImg: '麦粉',
introduce: '16小时即可长成 每八小时浇水一次 长成后预计可得4袋小麦',
introduce: '16小时即可长成 每八小时浇水一次 长成后预计可得4袋大米',
},
[CROP_TYPE.CORN]: { // 玉米
key: 'corn',
......
......@@ -526,7 +526,7 @@ export default class Crop extends eui.Component {
break;
case 2: // 小麦
case 2: // 水稻
break;
......
......@@ -37,12 +37,12 @@ const seedKV = {
* 操作面板
*/
export default class OptionPanel extends Component {
public chickBtn: eui.Image;
public chickBtn: eui.Group;
public cattleBtn: eui.Image;
public cornBtn: eui.Image;
public wheatBtn: eui.Image;
public walnutBtn: eui.Group;
public potatoBtn: eui.Group;
public wheatBtn: eui.Group;
public walnutBtn: eui.Image;
public potatoBtn: eui.Image;
private data = null;
......
......@@ -8,7 +8,7 @@
"feedNum": 20,
"id": 1,
"level": 1,
"petId": 0,
"petId": 2,
"lock": false
},
{
......@@ -18,7 +18,7 @@
"feedNum": 20,
"id": 2,
"level": 2,
"petId": 1,
"petId": 0,
"lock": false
},
{
......
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