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 Joncom

My walk animations seem to be inconsistent.

Sometimes he starts with his left foot. Other times his right. If I just tap up a bunch of times, it seems almost random which one it's going to be.

When an entity's animation is changed, doesn't it start from the first frame?

Is there a way to make it do so?

1 decade ago by paulh

.rewind()

Rewinds the animation to its first frame and resets the .loopCount

This method returns the animation itself. This is useful when switching between animations. E.g:

// In an entities .update() method
this.currentAnim = this.anims.jump.rewind();

1 decade ago by Joncom

Thank you. That was exactly what I needed! :)
Page 1 of 1
« first « previous next › last »