Assets Manager is now an external module
It is used to load and hold game assets such as
tilmaps(.tmg files), images and audio.
To attach data use in the register() stage:
register() {
page.loader.addAudio(key, url)
page.loader.addImage(key, url)
page.loader.addTileMap(key, url)
}
then call
app.preloadAllData()
after preloadAllData() promise will be resolved, data will be available with on init() and start() stages
start() {
const audio = page.loader.getAudio(key)
const image = page.loader.getImage(key)
const tilemap = page.loader.getTileMap(key)
...
}
*be careful with loading tilemaps and attached tilesets and images, everything should be in the same folder or subfolder.
*added audio files is better to register in the AudioInterface, How to add and use audio