dd
This commit is contained in:
@@ -39,6 +39,11 @@ export class CardControllerComp extends CCComp {
|
||||
if (this.in_load) {
|
||||
return
|
||||
}
|
||||
if (smc.vm_data.gold.min < smc.vm_data.gold.ref_cost) {
|
||||
oops.gui.toast("金币不足")
|
||||
return
|
||||
}
|
||||
smc.vm_data.gold.min -= smc.vm_data.gold.ref_cost;
|
||||
this.load_cards()
|
||||
|
||||
}
|
||||
@@ -47,7 +52,9 @@ export class CardControllerComp extends CCComp {
|
||||
let old_cards = ecs.query(ecs.allOf(HeroCardViewComp))
|
||||
if (old_cards.length > 0) {
|
||||
old_cards.forEach(element => {
|
||||
element.destroy();
|
||||
if (!element.get(HeroCardViewComp).in_destroy) {
|
||||
element.destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
// console.log(old_cards)
|
||||
|
||||
Reference in New Issue
Block a user