This commit is contained in:
walkpan
2024-09-30 08:39:10 +08:00
parent 45e1265e51
commit 5d79ad7d4f
28 changed files with 6057 additions and 10195 deletions

View File

@@ -384,6 +384,10 @@ export class RoleViewComp extends CCComp {
this.heathed();
this.tooltip(2,hp.toString());
let hp_progress= this.hp/this.hp_max;
this.hp += hp;
if(this.hp > this.hp_max){
this.hp = this.hp_max;
}
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
}
add_atk(atk: number,time:number=0){
@@ -520,7 +524,6 @@ export class RoleViewComp extends CCComp {
}
dead(){
oops.message.dispatchEvent("minssion_defeat");
var path = "game/skills/dead";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);