Jump to content

How to delay within a preload


blackhawx
 Share

Recommended Posts

Within a scene preload function, if I have the following logic setup

preload() {

   ...

    this.load.on('complete', function () {

        progress.destroy();

    });

    ...
}

...Is there a way we can set a delay (3 seconds), before progress is actually destroyed?

Setting `this.time.addEvent()` does not appear to work within a preload() instance.

 

Link to comment
Share on other sites

My goal within this preloading sequence is to place a Phaser graphic onto stage that increases in height as the progress gets to 100%, and at the same time, set a mask so that a background image is revealed as the the graphic height increases.  I feel i'm halfway there. 

I'll play with that timer event to see if that helps to keep my preload up long enough before I transition to the rest of the game.

Many thanks

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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