Jump to content

Animations Don't work in Groups [1.2]


LuckieLordie
 Share

Recommended Posts

I have an animated sprite I use for a number ticker display.

 

When it's not in a group the animation will play perfectly fine. However when the sprite object is added to a group it does not appear to play. However Phaser stores the animation and .isPlaying is set to true.

 

Any workarounds for this problem would be much appreciated!

 

Cheers.

Link to comment
Share on other sites

Hey Rich I figured it out!

 

My items were in a group that had their parent as Stage. This meant they still weren't getting a preUpdate.

 

To fix this I got rid of world.preUpdate. and instead gave Phaser.Stage a function for preUpdate that iterated through it's children for a preUpdate. This includes the world because it is a child of Stage.

 

I wasn't sure if this was an ideal solution so I've just detailed it so you can implement it how you like :P

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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