refactor(skill&atk): 优化伤害飘字与debuff图标显示逻辑
1. 调整fb-1、fb-3、fb-5、fb-6技能预制体的攻击偏移与跑动类型参数 2. 重构debuff图标映射逻辑,提取公共常量供多模块复用 3. 为DoT伤害飘字添加debuff图标显示功能,统一伤害与debuff展示流程 4. 修复tooltip预制体默认激活状态问题
This commit is contained in:
@@ -60,7 +60,7 @@ export class Tooltip extends ecs.Entity {
|
||||
this.remove(TooltipCom);
|
||||
super.destroy();
|
||||
}
|
||||
static load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",s_uuid:number=1001,parent:any=null,cd:number=1,fac:number=FacSet.MON,triggerType:string="") {
|
||||
static load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",s_uuid:number=1001,parent:any=null,cd:number=1,fac:number=FacSet.MON,triggerType:string="",debuffIcon:string="") {
|
||||
let node: Node;
|
||||
if (Tooltip.pool.size() > 0) {
|
||||
node = Tooltip.pool.get()!;
|
||||
@@ -75,7 +75,7 @@ export class Tooltip extends ecs.Entity {
|
||||
node.active = true;
|
||||
|
||||
var sv = node.getComponent(TooltipCom)!;
|
||||
sv.init(type, vaule, s_uuid, fac, triggerType);
|
||||
sv.init(type, vaule, s_uuid, fac, triggerType, debuffIcon);
|
||||
|
||||
// this.add(sv); // 不要添加到单例实体上,否则会覆盖或导致单例被销毁
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user