troyaaron Posted August 10, 2014 Share Posted August 10, 2014 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 More sharing options...
troyaaron Posted August 10, 2014 Author Share Posted August 10, 2014 SOLVED var candy = game.add.sprite(dropPos, dropOffset[candyType], 'candy', candyType);// add new animation framecandy.animations.add('anim', candyType, 10, true); Link to comment Share on other sites More sharing options...
end3r Posted August 12, 2014 Share Posted August 12, 2014 Sorry about that and thanks for checking out the tutorial - all you need to do is to addcandy.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 More sharing options...
Recommended Posts