This commit is contained in:
pan
2024-08-16 10:36:45 +08:00
parent dc12cea962
commit 5e4d16d6e7
19 changed files with 4425 additions and 3222 deletions

View File

@@ -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;
}