Jump to content

Animation reverse [Solved]


Recommended Posts

Hello all

I been trying trying to get a sprite sheet to play forward (no problem to do that one) but then play it in reverse also for a game that needs it to go forward backward and pause/stop animated sprite sheet.

I seen there is a reverse and isReversed for animation but for the life of me I can't get it working.

I take it it has been added to the framework anyone know how to implement it?

Any help would be greatly appreciated and thanks in advance.


Ps: just in case anyone offers a fix to work off of two sprite sheets, I am trying to avoid this, and to have it move forward/backward/pause from one sprite sheet.

the forward and pause is no problem just the reverse part. Thanks again in advance.


EDIT: lol a few moments more playing round with it and I figured it out, sorry about that.

I'll put it here in case anyone else has this issue.

var purball;
var puranim;
purball = this.game.add.sprite(133, 360,"purpleball");
puranim = purball.animations.add('walk');
puranim.play(10, true);

I'm sure there is more that can be done to this but I was just glad to see it working. Pretty simple and sweet


Edited by samriggs
found the fix
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...