Jump to content

sync sprite animations problem


trpzn
 Share

Recommended Posts

I need to launch a copy of an animation runing in the game but in coordinate way, that means launch the new animation in the same frame of the old one. it's this possible with phaser?

 

-reset the old animation to first frame not is a solution (ugly jump).

-changing the index of new animation dont seems to work.

Any possible solution?

Link to comment
Share on other sites

  • 2 weeks later...

Animations have an "onUpdate" signal that you could subscribe to to get the current frame. When the frame is equal to or greater than the frame index you want you could start the other animation.

 

What are you trying to do? Can you describe it in terms of the graphical effect you want to achieve?

Link to comment
Share on other sites

I have a grid with sea tiles that have 6 frames, in the beginning all seems be synchronized  because all are created in the same time, but later when i click in one sprite, change the sprite animation to other with the same background but still 6 frames. For this reason i need to launch the new animation in the same frame.
I think wait for the first frame will introduce lag in the click-change-sprite and will seems ugly.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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