游戏位置改变

This commit is contained in:
2024-09-02 10:50:59 +08:00
parent f367d1817a
commit 2062ff3b36
7 changed files with 901 additions and 201 deletions

View File

@@ -52,7 +52,7 @@ export class MonsterViewComp extends CCComp {
hp_speed: number = 0; //每秒回复量
power: number = 0; /**能量**/
power_max: number = 60; /** 能量最大值 */
power_max: number = 1200; /** 能量最大值 */
power_speed: number = 1; //能量回复速度每0.1秒回复量
skill_name: string = "base"; //技能名称
@@ -257,7 +257,9 @@ export class MonsterViewComp extends CCComp {
}
add_hp(hp: number=0){
console.log("hero 加血动画");
this.tooltip(2,"+"+hp.toString());
this.tooltip(2,hp.toString());
let hp_progress= this.hp/this.hp_max;
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
}
shield_change(hp: number){
let ls=this.shield - hp;