refactor(skill tooltip): 移除技能提示的触发类型相关参数

1.  移除TooltipCom中triggerType相关属性和setupTriggerBg方法
2.  简化各层调用时的triggerType参数传递
3.  删除未使用的SkillTriggerType导入
This commit is contained in:
panFD
2026-09-07 21:05:01 +08:00
parent aa488d55e7
commit 95a8c0e1d6
5 changed files with 8 additions and 51 deletions

View File

@@ -348,7 +348,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpda
// 触发复活动画
if (targetView && reviveSkillConf) {
targetView.playReady(reviveSkillConf.readyAnm);
targetView.skill_name('', reviveSkillConf.uuid, SkillTriggerType.Revive);
targetView.skill_name('', reviveSkillConf.uuid);
// 延迟 0.5 秒后恢复状态,让特效有时间播放,同时也能体现“正在复活”的过程
targetView.scheduleOnce(() => {
if (targetView.node && targetView.node.isValid) {

View File

@@ -216,10 +216,10 @@ export class HeroViewComp extends CCComp {
Tooltip.load(pos, type, value, s_uuid, this.node);
}
/** 技能提示 */
public skill_name(value: string = "", s_uuid: number = 1001, triggerType: string = "", y: number = 50) {
public skill_name(value: string = "", s_uuid: number = 1001, y: number = 50) {
let pos = v3(0, 60);
pos.y = pos.y + y;
Tooltip.load(pos, TooltipTypes.skill, value, s_uuid, this.node, 1, this.model?.fac ?? FacSet.MON, triggerType);
Tooltip.load(pos, TooltipTypes.skill, value, s_uuid, this.node, 1, this.model?.fac ?? FacSet.MON);
}
/** 血量提示(伤害数字) */
private hp_tip(type: number = 1, value: string = "", s_uuid: number = 1001, y: number = 0, debuffIcon: string = "") {
@@ -234,7 +234,7 @@ export class HeroViewComp extends CCComp {
// 起点设为怪物中心偏下位置,使其在血条下方
let ny = this.node.position.y + halfHeight - 15;
let pos = v3(x, ny, 0);
Tooltip.load(pos, type, value, s_uuid, this.node.parent, 1, this.model?.fac ?? FacSet.MON, "", debuffIcon);
Tooltip.load(pos, type, value, s_uuid, this.node.parent, 1, this.model?.fac ?? FacSet.MON, debuffIcon);
}
/** 护盾减免提示 */

View File

@@ -324,7 +324,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
if (castTimes > 1) {
val = "*" + castTimes.toString
}
heroView.skill_name(val, s_uuid, triggerType)
heroView.skill_name(val, s_uuid)
for (let i = 0; i < castTimes; i++) {
if (!heroView.node || !heroView.node.isValid) return;
// 多发/召唤按间隔错峰执行:i=0 立即,其余延迟 i*SUMMON_INTERVAL