Commit d32811cf authored by wildfirecode's avatar wildfirecode

1

parent 421fe41c
......@@ -10,7 +10,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn1" label="" x="444" y="356">
<e:Button id="buyBtn2" label="" x="444" y="356">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本_png" source.down="按钮 副本_png" source.disabled="按钮 副本_png"/>
......@@ -18,7 +18,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn3" label="" x="444" y="634">
<e:Button id="buyBtn1" label="" x="444" y="498">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本_png" source.down="按钮 副本_png" source.disabled="按钮 副本_png"/>
......@@ -26,7 +26,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn2" label="" x="444" y="498">
<e:Button id="buyBtn3" label="" x="444" y="634">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本_png" source.down="按钮 副本_png" source.disabled="按钮 副本_png"/>
......
import Panel from "../../libs/new_wx/components/Panel";
import { NetManager } from "../../libs/tw/manager/NetManager";
import PropType from "../PropType";
export default class ShopPanel extends Panel {
buyBtn1:eui.Button;
buyBtn3:eui.Button;
buyBtn2:eui.Button;
start(data) {
super.start();
this['buyBtn1'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy1,this);
this['buyBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy2,this);
this['buyBtn3'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy3,this);
}
onBuy1(){
this.buyBtn1.enabled = false;
NetManager.ins.hc_exchange((success) => {
this.buyBtn1.enabled = true;
if (success) {
}
}, 2, PropType.HAMMER);//兑换道具
}
onBuy2(){
this.buyBtn2.enabled = false;
NetManager.ins.hc_exchange((success) => {
this.buyBtn2.enabled = true;
if (success) {
}
}, 2, PropType.BOOM);//兑换道具
}
onBuy3(){
this.buyBtn3.enabled = false;
NetManager.ins.hc_exchange((success) => {
this.buyBtn3.enabled = true;
if (success) {
}
}, 2, PropType.CHANCE_NUM);//兑换道具
}
get skinKey() { return 'Shop' }
......
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