fix(英雄): 调整死亡效果的位置、缩放和动画
- 将死亡特效的Y轴位置从0调整为20,缩放从0.4增大到0.7,使其更明显 - 缩短英雄和怪物的死亡时间,从2秒/0.5秒调整为0.1秒 - 修正死亡特效的生成逻辑,现在正确使用父节点和世界坐标 - 更新死亡动画的帧率和时长,并添加完整的精灵帧序列
This commit is contained in:
@@ -31,9 +31,9 @@ export class HeroViewComp extends CCComp {
|
||||
status:String = "idle"
|
||||
scale: number = 1; // 显示方向
|
||||
box_group:number = BoxSet.HERO; // 碰撞组
|
||||
realDeadTime:number=2
|
||||
realDeadTime:number=0.1
|
||||
deadCD:number=0
|
||||
monDeadTime:number=0.5
|
||||
monDeadTime:number=0.1
|
||||
// 血条显示相关
|
||||
lastBarUpdateTime:number = 0; // 最后一次血条/蓝条/护盾更新时间
|
||||
// ==================== UI 节点引用 ====================
|
||||
@@ -317,7 +317,7 @@ export class HeroViewComp extends CCComp {
|
||||
this.spawnAnimEndFx("game/skill/buff/heathed", this.node, undefined);
|
||||
}
|
||||
private deaded(){
|
||||
this.spawnAnimEndFx("game/skill/end/atked", this.node, undefined);
|
||||
this.spawnAnimEndFx("game/skill/end/dead", this.node.parent, this.node.position);
|
||||
}
|
||||
private createFxNode(path: string, parent: Node | null, worldPos?: Vec3): Node | null {
|
||||
if (!parent || !parent.isValid) return null;
|
||||
@@ -327,7 +327,7 @@ export class HeroViewComp extends CCComp {
|
||||
if (!node || !node.isValid) return null;
|
||||
node.parent = parent;
|
||||
if (worldPos) {
|
||||
node.setWorldPosition(worldPos);
|
||||
node.setPosition(worldPos);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user