fix(hero): 修正攻击和buff动画的播放条件
将攻击和buff动画的播放条件从检查"atk0"和"buff"改为检查"max0"是否正在播放,避免动画冲突
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user