feat(英雄属性): 添加HP/MP基础属性管理方法并移除health方法冗余参数

添加add_hp、add_mp和add_shield方法用于管理英雄基础属性
移除HeroViewComp.health方法中不再使用的is_num参数
恢复TalComp中HP和MP天赋效果的处理逻辑
This commit is contained in:
2025-11-25 16:45:05 +08:00
parent b73d756106
commit b965c88961
3 changed files with 34 additions and 7 deletions

View File

@@ -289,7 +289,7 @@ export class HeroViewComp extends CCComp {
if(this.model && this.model.shield>0) this.show_shield(this.model.shield, this.model.Attrs[Attrs.SHIELD_MAX]);
}
health(hp: number = 0, is_num:boolean=true) {
health(hp: number = 0) {
// 生命值更新由 Model 层处理,这里只负责视图表现
this.heathed();
this.hp_tip(TooltipTypes.health, hp.toFixed(0));