fix(skill): 修复技能相关的显示与逻辑问题

1. 调整技能预制体的锚点和攻击偏移参数
2. 修复SkillView.ts的代码格式与导入错误
3. 补充fixed类型技能的动画结束销毁逻辑
This commit is contained in:
pan
2026-08-13 15:36:57 +08:00
parent 7fa18329d6
commit c6b5e1431f
2 changed files with 29 additions and 23 deletions

View File

@@ -142,7 +142,7 @@
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
"y": 0.5
},
"_id": ""
},
@@ -231,7 +231,7 @@
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
"y": 0.5
},
"_id": ""
},
@@ -252,7 +252,7 @@
"__id__": 11
},
"atk_x": 20,
"atk_y": 0,
"atk_y": 30,
"_id": ""
},
{
@@ -314,7 +314,7 @@
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 59.9
"y": -0.1
},
"_size": {
"__type__": "cc.Size",

View File

@@ -2,7 +2,7 @@ import { _decorator, Animation, CCInteger, Collider2D, Contact2DType, UITransfor
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { DTType, EType, SkillConfig, SkillSet } from "../common/config/SkillSet";
import { DTType, EType, RType, SkillConfig, SkillSet } from "../common/config/SkillSet";
import { SDataCom } from "./SDataCom";
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
import { DamageQueueHelper } from "../hero/DamageQueueComp";
@@ -131,6 +131,12 @@ export class SkillView extends CCComp {
if (this.SConf.EType == EType.animationEnd) {
this.disable_collider_now();
this.ent.destroy()
return;
}
// fixed 类型不移动,无法通过移动完成销毁;动画播完作为兜底销毁时机
if (this.SConf.RType == RType.fixed) {
this.disable_collider_now();
this.ent.destroy()
}
}
// 动画帧事件 atk仅负责开启一帧碰撞窗口不负责伤害与计数