dd
This commit is contained in:
@@ -45,13 +45,11 @@ export class HeroCardViewComp extends CCComp {
|
||||
let active = parent.getChildByName("active");
|
||||
active.setPosition(this.node.position.x,this.node.position.y)
|
||||
active.active = true;
|
||||
console.log(parent);
|
||||
// if(this.ent.eid == smc.vm_data.cards.eid){
|
||||
// this.node.getChildByName("active").active = true;
|
||||
// }else{
|
||||
// this.node.getChildByName("active").active = false;
|
||||
// }
|
||||
console.log("onTouchMove");
|
||||
let delta = event.getDelta();
|
||||
this.node.setPosition(this.node.position.x+delta.x,this.node.position.y+delta.y);
|
||||
}
|
||||
@@ -68,7 +66,7 @@ export class HeroCardViewComp extends CCComp {
|
||||
}
|
||||
use_card(){
|
||||
if(smc.vm_data.gold.min >= CardSet[this.card_uid].level){
|
||||
oops.message.dispatchEvent("do_add_hero",this.ent)
|
||||
oops.message.dispatchEvent("do_add_hero",{uuid:this.card_uid})
|
||||
this.ent.destroy();
|
||||
smc.vm_data.gold.min -= CardSet[this.card_uid].level;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user