dd
This commit is contained in:
@@ -35,6 +35,16 @@ export class CardControllerComp extends CCComp {
|
||||
this.load_cards()
|
||||
}
|
||||
}
|
||||
cards_update(){
|
||||
if(smc.vm_data.gold.min >= smc.vm_data.gold.up_cost){
|
||||
smc.vm_data.gold.min -= smc.vm_data.gold.up_cost;
|
||||
this.card_level += 1;
|
||||
smc.vm_data.gold.up_cost += 1
|
||||
console.log("card _level:"+this.card_level+"cost:"+smc.vm_data.gold.up_cost)
|
||||
}else{
|
||||
oops.gui.toast("金币不够");
|
||||
}
|
||||
}
|
||||
palyer_ref(){
|
||||
if (this.in_load) {
|
||||
return
|
||||
@@ -66,9 +76,8 @@ export class CardControllerComp extends CCComp {
|
||||
let card = ecs.getEntity<HeroCard>(HeroCard);
|
||||
let pos = v3(x,y)
|
||||
card.load(pos,element[0],cards_node);
|
||||
x=x+100
|
||||
x=x+120
|
||||
});
|
||||
this.node.getChildByName("cards").getChildByName("active").active = false
|
||||
this.in_load = false;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user