Alphapage Posted July 25, 2014 Share Posted July 25, 2014 Hello, As far as I think, phaser is loading asynchronously images in preload using this.game.load and caches images in memory, then continue with create(). If so, how can I tell phaser preload to wait for the async function to terminate when I run an async process in preload ?Wouldn't it be nice to have a this.game.load.fromLocalStorage which returns an object for heavy files located in local storage and be able to get the progression ? Thanks in advance for your help or your opinion. Link to comment Share on other sites More sharing options...
lewster32 Posted July 25, 2014 Share Posted July 25, 2014 I think typically this is what manifest files are for, but yes this can be done not with preload but with states - if you have a boot state, you can use that to call forth your stored assets and do your own management of their progress and so on. When you've detected that they're done, you can just advance the state to the next one (menu or whatever) and if they're stored in the cache, they'll be accessible anywhere else in your game. Link to comment Share on other sites More sharing options...
Recommended Posts