dd
This commit is contained in:
@@ -64,7 +64,9 @@ export class HeroCardViewComp extends CCComp {
|
||||
this.show_info()
|
||||
}
|
||||
show_info(){
|
||||
console.log("show_info",this.card_uid)
|
||||
let parent = this.node.parent.parent
|
||||
let node =parent.getChildByName("item_box")
|
||||
if(this.card_type == 2){
|
||||
smc.vm_data.item_box.info = SkillSet[this.card_uid].info
|
||||
smc.vm_data.item_box.name = SkillSet[this.card_uid].name
|
||||
@@ -72,7 +74,24 @@ export class HeroCardViewComp extends CCComp {
|
||||
smc.vm_data.item_box.skillsd = SkillSet[this.card_uid].sd
|
||||
smc.vm_data.item_box.atk = SkillSet[this.card_uid].atk
|
||||
smc.vm_data.item_box.hp = SkillSet[this.card_uid].hp
|
||||
parent.getChildByName("item_box").active=true
|
||||
node.active=true
|
||||
}
|
||||
if(this.card_type == 3){
|
||||
console.log(SkillSet[this.card_uid])
|
||||
smc.vm_data.item_box.info = SkillSet[this.card_uid].info
|
||||
smc.vm_data.item_box.name = SkillSet[this.card_uid].name
|
||||
smc.vm_data.item_box.skillcd = SkillSet[this.card_uid].cd
|
||||
smc.vm_data.item_box.skillsd = SkillSet[this.card_uid].sd
|
||||
smc.vm_data.item_box.atk = SkillSet[this.card_uid].atk
|
||||
smc.vm_data.item_box.hp = SkillSet[this.card_uid].hp
|
||||
smc.vm_data.item_box.shield = SkillSet[this.card_uid].shield
|
||||
node.active=true
|
||||
if(SkillSet[this.card_uid].shield > 0){
|
||||
node.getChildByName("data").getChildByName("shield").active=true
|
||||
}
|
||||
if(SkillSet[this.card_uid].hp > 0){
|
||||
node.getChildByName("data").getChildByName("hp").active=true
|
||||
}
|
||||
}
|
||||
}
|
||||
onTouchEnd(){
|
||||
@@ -82,8 +101,11 @@ export class HeroCardViewComp extends CCComp {
|
||||
this.node.setPosition(this.pos_x,this.pos_y);
|
||||
}
|
||||
let parent = this.node.parent.parent
|
||||
|
||||
parent.getChildByName("item_box").active=false
|
||||
let node = parent.getChildByName("item_box")
|
||||
node.active=false
|
||||
node.getChildByName("data").getChildByName("shield").active=false
|
||||
node.getChildByName("data").getChildByName("hp").active=false
|
||||
|
||||
}
|
||||
|
||||
private do_active_card_eid(event: string, args: any) {
|
||||
|
||||
Reference in New Issue
Block a user