1 decade ago by MrIsaacs
Hello there, i started a few days ago with imapctjs and already hitted some problems with playing some Animation.
Code:
Now my Problem:
doSomething duration is 1 sec per frame. The first frame of doSomething sometimes plays just for a few seconds and not for the listed duration in the Animation. This is always happening when I want to change the the Animation by click to the doSomething Animation.
If i've not explained myself good enough, your pleased to ask me, because a can't get further without this.
Thank you, impactJS-Comunity
and thank you Dominic
Code:
this.anima = 1; if(ig.input.pressed('touch')) { if(this.anima){ if(this.player.currentAnim.loopCount && this.player.currentAnim == this.player.anims.idle) { this.player.currentAnim = this.player.anims.doSomething; this.anima = 0; } } else{ if(this.player.currentAnim.loopCount && this.player.currentAnim == this.player.anims.doSomething) { this.player.currentAnim = this.player.anims.idle; this.anima = 1; } } }
Now my Problem:
doSomething duration is 1 sec per frame. The first frame of doSomething sometimes plays just for a few seconds and not for the listed duration in the Animation. This is always happening when I want to change the the Animation by click to the doSomething Animation.
If i've not explained myself good enough, your pleased to ask me, because a can't get further without this.
Thank you, impactJS-Comunity
and thank you Dominic