refactor(game): 优化属性卡牌配置与UI更新逻辑

- 将AttrSet中的`note`字段统一重命名为`name`,提高字段语义清晰度
- 在CardSet中修正属性卡和药水卡名称的获取逻辑,使用新的`name`字段
- 调整HeroViewComp的health方法,增加血量变化小于等于99时不显示特效的优化
- 将HeroAttrsSystem中的自然回复计时器从1秒改为5秒,并更新相关注释
- 移除HeroViewComp中已注释的冗余UI更新代码,保持代码整洁
This commit is contained in:
panw
2026-02-04 16:23:09 +08:00
parent 701382e868
commit 0a8f2056c3
4 changed files with 76 additions and 81 deletions

View File

@@ -342,13 +342,11 @@ export class HeroViewComp extends CCComp {
health(hp: number = 0) {
// ✅ 仅显示特效和提示,不调用 hp_show()
if(hp<=99) return;
this.heathed();
this.hp_tip(TooltipTypes.health, hp.toFixed(0));
this.top_node.active = true;
this.lastBarUpdateTime = Date.now() / 1000;
// ❌ 移除UI更新由脏标签机制处理
// this.hp_show();
}
mp_add(mp: number = 0) {
@@ -356,9 +354,6 @@ export class HeroViewComp extends CCComp {
this.hp_tip(TooltipTypes.addmp, mp.toFixed(0));
this.top_node.active = true;
this.lastBarUpdateTime = Date.now() / 1000;
// ❌ 移除UI更新由脏标签机制处理
// this.mp_show();
}
alive(){