Jump to content

TileSprite with Atlas


jonbon
 Share

Recommended Posts

Hi,

 

I think there is a bug with TileSprite when using a frame of a sprite atlas instead of a single image. When I try to do this, the whole sprite atlas gets repeated instead of the desired frame.

 

So when I do:

this.game.add.tileSprite(0, 0, 800, 600, 'generalAtlas','pitchTexture1.png');

 

I get the whole atlas repeating.

 

I checked that it's not a problem with my atlas by trying the same thing but in a regular Sprite:

this.game.add.sprite(0, 0, 'generalAtlas','pitchTexture1.png');

 

This works fine.

 

Is this a bug? Or am I doing something wrong?

 

Thanks

Link to comment
Share on other sites

Actually it's both correct and a bug :) The bug is that Phaser shouldn't let you set a frame from the atlas, and should require you to set the image only. So I will remove the frame parameter now. The correct part is the way it repeats the whole image.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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