From d915dfa1218ea65b660956e28fac2fa60faaca3c Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 31 Dec 2025 16:09:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(hero):=20=E4=BF=AE=E6=AD=A3=E6=94=BB?= =?UTF-8?q?=E5=87=BB=E5=92=8Cbuff=E5=8A=A8=E7=94=BB=E7=9A=84=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将攻击和buff动画的播放条件从检查"atk0"和"buff"改为检查"max0"是否正在播放,避免动画冲突 --- assets/script/game/hero/HeroAnmComp.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/script/game/hero/HeroAnmComp.ts b/assets/script/game/hero/HeroAnmComp.ts index f7fc003b..0e0c1ea0 100644 --- a/assets/script/game/hero/HeroAnmComp.ts +++ b/assets/script/game/hero/HeroAnmComp.ts @@ -36,7 +36,8 @@ export default class HeroAnmComp extends Component{ this.default_anim='move' } atk () { - if(this.anmcon.getState("atk0").isPlaying) return + if(this.anmcon.getState("max0").isPlaying) return + // if(this.anmcon.getState("atk0").isPlaying) return this.anmcon.play("atk0") } max () { @@ -49,7 +50,7 @@ export default class HeroAnmComp extends Component{ this.default_anim='idle' } buff(){ - if(this.anmcon.getState("buff").isPlaying) return + if(this.anmcon.getState("max0").isPlaying) return this.anmcon.play("buff") } dead(){