Jump to content

Specific Atlas Frame tileSprite


Secretmapper
 Share

Recommended Posts

Hello. How would I set a specific frame to show on tileSprite?

 

Like this:

background = game.add.tileSprite(0, 0, this.game.width, this.game.height, 'sheet', 'darkPurple');

I know that this doesn't work, as tileSprite doesn't accept a frame parameter, but how would I achieve it?

 

I have also tried:

   var bg = this.cache.getFrameData('sheet');        bg = bg._frames[bg._frameNames['darkPurple']];       background = game.add.tileSprite(0, 0, this.game.width, this.game.height, bg);

to no avail

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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