Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Atlas instead of sprites?


Jirka1111
 Share

Recommended Posts

Yeah, that's right  :D What if I need to change my character sprite? Do I have to use kill() function and then game.add.sprite?

 

EDIT: Cannot set frameName: bird.png?

 

What the hell? Name is the same...

 

Preloader:

 

this.load.atlas('atlas', 'images/atlas.png', 'images/atlas.json');

 

Main state:

 

Bird.bird = this.add.sprite(Bird.GAME_WIDTH/3, Bird.GAME_HEIGHT/2, 'atlas');

Bird.bird.frameName = 'bird.png';
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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