fix: 调整生命值特效触发阈值从99改为20
避免低生命值时频繁触发特效和提示,优化游戏体验。
This commit is contained in:
@@ -367,7 +367,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
|
|
||||||
health(hp: number = 0) {
|
health(hp: number = 0) {
|
||||||
// ✅ 仅显示特效和提示,不调用 hp_show()
|
// ✅ 仅显示特效和提示,不调用 hp_show()
|
||||||
if(hp<=99) return;
|
if(hp<=20) return;
|
||||||
this.heathed();
|
this.heathed();
|
||||||
this.hp_tip(TooltipTypes.health, hp.toFixed(0));
|
this.hp_tip(TooltipTypes.health, hp.toFixed(0));
|
||||||
this.lastBarUpdateTime = Date.now() / 1000;
|
this.lastBarUpdateTime = Date.now() / 1000;
|
||||||
|
|||||||
Reference in New Issue
Block a user