Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Nathre

Pretty much that.

Hello again everyone. I have a problem making a new entity to move after it plays an animacion. It's basicly in 'idle' so I tried using .rewind() but didnt work well. The thing I'm trying to do is to play it's animation and then move it's position to --this.pos.x = 20;--

Can You girls or guys help here? ;(

1 decade ago by BerndSmith

You could just try to ask for the last frame of the Animation in the update function:

if (this.currentAnim.frame == <lastFrame of your Animation>) {
    this.pos.x = 20;
};
Page 1 of 1
« first « previous next › last »