新英雄
This commit is contained in:
@@ -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","atk1","atk2","atk","max","max1","stun","dead","buff"]
|
||||
anms:any[]=["idle","move","stun","dead","buff","atk0","atk1","atk2","max0","max1"]
|
||||
onLoad () {
|
||||
this.anmcon=this.node.getComponent(Animation)
|
||||
this.anmcon.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
@@ -31,12 +31,12 @@ export default class HeroAnmComp extends Component{
|
||||
this.default_anim='move'
|
||||
}
|
||||
atk () {
|
||||
if(this.anmcon.getState("atk").isPlaying) return
|
||||
this.anmcon.play("atk")
|
||||
if(this.anmcon.getState("atk0").isPlaying) return
|
||||
this.anmcon.play("atk0")
|
||||
}
|
||||
max () {
|
||||
if(this.anmcon.getState("max").isPlaying) return
|
||||
this.anmcon.play("max")
|
||||
if(this.anmcon.getState("max0").isPlaying) return
|
||||
this.anmcon.play("max0")
|
||||
}
|
||||
idle () {
|
||||
if(this.anmcon.getState("idle").isPlaying) return
|
||||
|
||||
Reference in New Issue
Block a user