|
|
@@ -48,13 +48,14 @@ export class Pay extends Component {
|
|
|
private node_descid: Node = null;
|
|
|
private node_buy: Node = null;
|
|
|
private gene_items: Generate = null;
|
|
|
+ private node_light: Node = null;
|
|
|
private lb_money: Label = null;
|
|
|
private edit_id: EditBox = null;
|
|
|
|
|
|
private select_data = 0;
|
|
|
|
|
|
protected start(){
|
|
|
- UtilsPanel.getAllNeedCom(this, this.node, false);
|
|
|
+ UtilsPanel.getAllNeedCom(this, this.node, true);
|
|
|
UtilsPanel.addBtnEvent(this.node_buy, this.onBuy, this);
|
|
|
// @ts-ignore
|
|
|
game.on("select_item", this.onSelect, this);
|
|
|
@@ -65,6 +66,7 @@ export class Pay extends Component {
|
|
|
let info:ShopData = Pay.data_shop = JSON.parse(content);
|
|
|
// console.log("fwef:",info);
|
|
|
this.gene_items.initData(new Array(info.DefaultPrice.length + 1));
|
|
|
+ this.node_light.setSiblingIndex(-1);
|
|
|
}
|
|
|
}, false);
|
|
|
}
|
|
|
@@ -72,9 +74,11 @@ export class Pay extends Component {
|
|
|
this.node_descid.active = this.edit_id.string.length == 0;
|
|
|
Pay.user_id = this.edit_id.string;
|
|
|
}
|
|
|
- private onSelect(money:number, gold:number){
|
|
|
+ private onSelect(money:number, node:Node){
|
|
|
this.select_data = money;
|
|
|
this.lb_money.string = money + "";
|
|
|
+ this.node_light.active = true;
|
|
|
+ this.node_light.setPosition(node.position);
|
|
|
}
|
|
|
private onBuy(){
|
|
|
if(this.select_data == 0){
|