dd
This commit is contained in:
@@ -97,11 +97,11 @@ export class HeroCardViewComp extends CCComp {
|
||||
}
|
||||
|
||||
use_card(){
|
||||
if(smc.vm_data.gold.min >= CardSet[this.card_uid].level){
|
||||
if(smc.vm_data.gold.min >= smc.vm_data.cards.ref_cost){
|
||||
this.in_destroy = true;
|
||||
oops.message.dispatchEvent("do_add_hero",{uuid:this.card_uid})
|
||||
this.ent.destroy();
|
||||
smc.vm_data.gold.min -= CardSet[this.card_uid].level;
|
||||
smc.vm_data.gold.min -= smc.vm_data.cards.ref_cost;
|
||||
}else{
|
||||
oops.gui.toast("金币不够");
|
||||
this.node.setPosition(this.pos_x,this.pos_y);
|
||||
|
||||
Reference in New Issue
Block a user