Jump to content

setPreloadSprite not working as expected


plicatibu
 Share

Recommended Posts

I'm using the following code in order to have a loading bar:

// in boot.jsthis.load.image('loaderFull', 'images/full.png');this.load.image('loaderEmpty', 'images/empty.png');
// in preloader.jsthis.loaderEmpty = this.add.sprite(100, 100, 'loaderEmpty');this.loaderEmpty.name = 'loaderEmpty';this.preloadBar = this.add.sprite(100, 100, 'loaderFull');this.load.setPreloadSprite(this.preloadBar);

It works fine on version 1.1.3 (see image below)

 

preloader-working-fine.jpg

 

but when I use version 2.0 It becomes weird.

 

preloader-NOT-working-.jpg

 

Any clue?

 

Thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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