战斗等级显示需要完善

This commit is contained in:
2025-05-26 16:38:59 +08:00
parent 85856ccc28
commit 3efbf21a14
8 changed files with 159 additions and 109 deletions

View File

@@ -254,6 +254,28 @@ export class HeroViewComp extends CCComp {
}
do_dead(){
}
do_atked(remainingDamage:number){
if (this.shield > 0) {
this.shield -= 1
this.BUFFCOMP.tooltip(5,"*吸收*");
remainingDamage = 0
if (this.shield <= 0) {
if(this == null) return;
this.BUFFCOMP.show_shield(false);
}
}else{
if(this == null) return;
this.hp -= remainingDamage;
if(this.hp <= 0) {
if(this == null) return;
this.BUFFCOMP.dead()
if(this.ent == null) return;
this.ent.destroy();
}
this.BUFFCOMP.hp_show()
this.showDamage(remainingDamage, true);
}
}
dead(){
this.BUFFCOMP.dead()