Search the Community
Showing results for tags 'phaser.loader'.
-
Hi everyone, Is there an equivalent of "addToFileList" in Phaser 3?
- 2 replies
-
- phaser
- addtofilelist
-
(and 1 more)
Tagged with:
-
Hi everyone, Is there an equivalent of "addToFileList" in Phaser 3?
-
Hi all. I've created a game using some tutorials and examples. Suddenly I've found that used Phaser 2.0.3 instead of 2.6.2 so changed the file. And then the problem appears (in 2.0.3 everything works well). My game has 2 states. First is Load - where the loader image appears and then all other assets should be loaded (like in "load-events" example). Unfortunately it works not as expected. Only 2-3 files are loaded and then "Phaser.Loader - active loading canceled / reset" - this message appears in console. I've tried the following: removed game.load.start() from the function and checked game.load._fileList and game.load._flightQueue - they are both empty though there should be a list of files to load. Then I call the function containing the queue manually from console. After this game.load._fileList is full. Then game.load.start() also from console - and everything shows as it should be. What's wrong with the flow in states?
-
Hi, To make the preload faster, I need to load several assets after the preload phase, and use then when they has been loaded. To do that, I've used the Phaser.Loader object and register to "onFileComplete" Phaser.Signal to catch the file when has been loaded, to load the next file. This works well until I need to change the current state and there are an asset being loaded. When the file is loaded and the new state has been created, Phaser detects that the Loader is not loading (processLoadQueue method from Phaser.loader) and shows this message: 'Phaser.Loader - active loading canceled / reset', and the "onFileComplete" registered functions, are not fired, and I cannot continue loading more assets. My idea was to attach to "onStateChange" signal and stop/pause the current async download, but there are no public methods in Phaser.Loader to do that. Are there a good way to load assets asynchronously with state changes? Thanks