blackhawx Posted October 19, 2018 Share Posted October 19, 2018 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 More sharing options...
rich Posted October 19, 2018 Share Posted October 19, 2018 You could use a timer event, just make sure it’s scoped properly, but what’s the use case for the delay? Link to comment Share on other sites More sharing options...
blackhawx Posted October 19, 2018 Author Share Posted October 19, 2018 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 More sharing options...
Recommended Posts