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?