Jump to content

Create animation using multiple images


Recommended Posts

I have 29 different images named "ocean-0" to "ocean-28" that I preload using game.load.image().

I'm trying to make an animation with them using the following:

var frames =  Phaser.Animation.generateFrameNames('ocean-', 0,  28);
this.water.animations.add('ocean', frames, 10, true);
this.water.animations.play('ocean', 10, true);


However I get this error:

TypeError: this.currentFrame is undefined[Learn More]

What am I doing wrong?

Link to comment
Share on other sites

  • 5 months later...
  • 4 months later...

  • Recently Browsing   0 members

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