dd
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user