feat: 为工具提示添加阵营区分显示

扩展 Tooltip 系统以支持根据伤害来源的阵营(英雄或怪物)显示不同的文本标签。修改 HeroViewComp 调用时传递阵营信息,TooltipCom 根据阵营选择对应的本地化键名。同时调整了工具提示预制件的默认激活状态和文本颜色。
This commit is contained in:
panw
2026-03-24 10:16:31 +08:00
parent 78d4b10a88
commit abcbeff9ab
4 changed files with 13 additions and 11 deletions

View File

@@ -286,7 +286,7 @@ export class HeroViewComp extends CCComp {
// 起点设为怪物中心位置 + 20偏移
let ny = this.node.position.y + halfHeight + 20;
let pos = v3(x, ny, 0);
Tooltip.load(pos, type, value, s_uuid, this.node.parent);
Tooltip.load(pos, type, value, s_uuid, this.node.parent, 1, this.model?.fac ?? FacSet.MON);
}
/** 护盾吸收提示 */