refactor(skill tooltip): 优化技能触发类型命名与 tooltip 背景配置

1. 修正 SkillTriggerName 中的技能触发类型文本翻译,使其更贴合游戏内实际表述
2. 为 tooltip 预制体和组件新增6种状态的背景节点引用
This commit is contained in:
panFD
2026-06-19 15:10:19 +08:00
parent 2d4bc1fd05
commit 9220254c56
3 changed files with 40 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
import { _decorator, Collider2D, Contact2DType, v3, IPhysics2DContact, Vec3, tween, Label, resources, SpriteFrame, Sprite, UIOpacity, Color, math, Tween } from "cc";
import { _decorator, Collider2D, Contact2DType, v3, IPhysics2DContact, Vec3, tween, Label, resources, SpriteFrame, Sprite, UIOpacity, Color, math, Tween,Node } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { SkillSet } from "../common/config/SkillSet";
@@ -11,11 +11,24 @@ const { ccclass, property } = _decorator;
@ccclass('TooltipCom')
@ecs.register('TooltipView', false)
export class TooltipCom extends CCComp {
@property(Node)
atking_bg: Node = null;
@property(Node)
atked_bg: Node = null;
@property(Node)
fstart_bg: Node = null;
@property(Node)
fend_bg: Node = null;
@property(Node)
dead_bg: Node = null;
@property(Node)
revive_bg: Node = null;
stype: number = 1; // 1:减少生命值2增加生命值3技能图标
value: string = "";
s_uuid: number = 1001;
fac: number = FacSet.MON;
// 动画参数配置
private readonly popDuration = 0.15;
private readonly driftDuration = 0.5;