This commit is contained in:
2025-06-30 17:24:04 +08:00
parent 63f85a223d
commit ded1b36cfb
2 changed files with 3 additions and 3 deletions

View File

@@ -220,6 +220,7 @@ export class HeroViewComp extends CCComp {
this.ap += Math.floor(ap/100*this.ap);
}
this.BUFFCOMP.vmdata_update()
this.BUFFCOMP.tooltip(TooltipTypes.apup,ap.toFixed(0));
oops.message.dispatchEvent(GameEvent.APChange,{fac:this.fac})
}
@@ -231,7 +232,6 @@ export class HeroViewComp extends CCComp {
this.ap -= Math.floor(ap/100*this.ap);
}
this.BUFFCOMP.vmdata_update()
this.BUFFCOMP.tooltip(TooltipTypes.apup,ap.toFixed(0));
}
update_hp(e:GameEvent,data:any){
console.log("[HeroViewComp]:update_hp",data)

View File

@@ -80,7 +80,7 @@ export class TooltipCom extends CCComp {
case TooltipTypes.apup:
this.node.getChildByName("apup").getChildByName("num").getComponent(Label).string = "+"+this.value;
this.node.getChildByName("apup").active=true;
this.node.setPosition(v3(this.node.position.x,this.node.position.y-30))
this.node.setPosition(v3(this.node.position.x,this.node.position.y-60))
this.scheduleOnce(()=>{
this.ent.destroy()
},0.5)
@@ -88,7 +88,7 @@ export class TooltipCom extends CCComp {
case TooltipTypes.hpup:
this.node.getChildByName("hpup").getChildByName("num").getComponent(Label).string = "+"+this.value;
this.node.getChildByName("hpup").active=true;
this.node.setPosition(v3(this.node.position.x,this.node.position.y-30))
this.node.setPosition(v3(this.node.position.x,this.node.position.y-60))
this.scheduleOnce(()=>{
this.ent.destroy()
},0.5)