Jump to content

Animated tilesprite.


Recommended Posts


I'm using a tilesprite to repeat the current frame of the animation across the width of the sprite.
When I try to animate this tilesprite, it just gets stuck on the first frame of the animation. Whenever I change the tilesprite to sprite it does work, but then it stretches instead of repeating the pattern.

this.visualpipe = this.game.add.tileSprite(x2, y2, width2, height2, 'pipe', 0);
this.visualpipe.animations.add('flow', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 16, true, true);
this.visualpipe.animations.play('flow', 5);

Thank you!

Link to comment
Share on other sites

6 minutes ago, P4nch0 said:


Show what tilesprite it is, and screen of what you have got when you play animation :)



This doesn't animate. When I change it to a sprite instead of tileSprite, it does animate but becomes stretched like this:


Link to comment
Share on other sites


  • Recently Browsing   0 members

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