fix(英雄动画): 修正死亡状态播放动画的位置基准

将死亡状态动画的播放从 playReady 改为 playOther,并确保动画以英雄当前位置为基准挂载到父节点,避免英雄节点销毁时动画被中断。
This commit is contained in:
walkpan
2026-04-05 22:55:26 +08:00
parent c054209025
commit 5d188bb5aa
2 changed files with 3 additions and 2 deletions

View File

@@ -304,7 +304,8 @@ export class HeroViewComp extends CCComp {
public playOther(anm: string = ""){
if(anm==="") return;
var path = "game/skill/ready/" + anm;
this.spawnAnimEndFx(path, this.node.parent, undefined);
// 以自身当前位置为基准,挂载到父节点,即使自身节点销毁动画也能继续播放
this.spawnAnimEndFx(path, this.node.parent, this.node.position);
}
public playEnd(anm: string = ""){
if(anm==="") return;