Jump to content

Animated tilesprite.


StanJan
 Share

Recommended Posts

Hello,

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:

Hi,

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

C9stoSD.png

tG8O1tk.png

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

uBnQyOP.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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