英雄动画重构

This commit is contained in:
2025-10-23 10:43:15 +08:00
parent b0751992f4
commit c1544365ba
211 changed files with 83876 additions and 35746 deletions

View File

@@ -9,7 +9,7 @@ export default class HeroAnmComp extends Component{
private anmcon:any=null
private _hasStop = true;
private default_anim:string='Idle'
anms:any[]=["idle","move","atk","max","debbuff","atked"]
anms:any[]=["idle","move","atk1","atk2","atk","max","max1","stun","dead","buff"]
onLoad () {
this.anmcon=this.node.getComponent(Animation)
this.anmcon.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
@@ -38,10 +38,6 @@ export default class HeroAnmComp extends Component{
if(this.anmcon.getState("max").isPlaying) return
this.anmcon.play("max")
}
atked () {
if(this.anmcon.getState("atked").isPlaying) return
this.anmcon.play("atked")
}
idle () {
if(this.anmcon.getState("idle").isPlaying) return
this.anmcon.play("idle")