Jump to content

Monster wants candy - only 1st candy drops


troyaaron
 Share

Recommended Posts

I'm only just starting out learning Phaser and followed the monster wants candy tutorial

 

Mine doesn't cycle through the 5 candies, it only drops the first one.

 

I think this was a change from the demo to the full version, but cannot find out whats wrong with the code.

 

Any ideas how to cycle through the 5 parts of the png file?

Link to comment
Share on other sites

Sorry about that and thanks for checking out the tutorial - all you need to do is to add

candy.animations.play('anim');

after the candy.animations.add line.

The original source code was published without that line - the demo was working without it a few versions of Phaser earlier and I just missed it when updating to the latest one. It was quickly fixed and the source code is up-to-date.

If you have more questions or issues please visit the official thread of that tutorial on the forums, thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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