动画替换完成
This commit is contained in:
@@ -30,24 +30,7 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
|
||||
show_info(uuid:number,type:number){
|
||||
// console.log("show_info",uuid)
|
||||
let node =this.node.getChildByName("item_box")
|
||||
if(type == 2){
|
||||
smc.vmdata.item_box.info = smc.sitems[uuid].info
|
||||
smc.vmdata.item_box.name = smc.sitems[uuid].name
|
||||
smc.vmdata.item_box.skillcd = smc.sitems[uuid].cd
|
||||
smc.vmdata.item_box.skillsd = smc.sitems[uuid].sd
|
||||
smc.vmdata.item_box.atk = smc.sitems[uuid].atk
|
||||
smc.vmdata.item_box.hp = smc.sitems[uuid].hp
|
||||
smc.vmdata.item_box.shield = smc.sitems[uuid].shield
|
||||
node.active=true
|
||||
if(smc.sitems[uuid].shield > 0){
|
||||
node.getChildByName("data").getChildByName("shield").active=true
|
||||
}
|
||||
if(smc.sitems[uuid].hp > 0){
|
||||
node.getChildByName("data").getChildByName("hp").active=true
|
||||
}
|
||||
}
|
||||
console.log("show_info",uuid)
|
||||
}
|
||||
|
||||
protected update(dt: number): void {
|
||||
@@ -82,7 +65,6 @@ export class CardControllerComp extends CCComp {
|
||||
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false
|
||||
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=false
|
||||
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=true
|
||||
|
||||
}
|
||||
to_hero(){
|
||||
this.node.getChildByName("mission_home").active=false
|
||||
@@ -93,12 +75,6 @@ export class CardControllerComp extends CCComp {
|
||||
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false
|
||||
|
||||
}
|
||||
item_info_show(){
|
||||
this.node.getChildByName("item_info").setScale(1,1,1)
|
||||
}
|
||||
item_info_hide(){
|
||||
this.node.getChildByName("item_info").setScale(0,0,1)
|
||||
}
|
||||
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
|
||||
Reference in New Issue
Block a user