Hi!
I created a custom arrow function inside my class to load things afterwards, but the event filecomplete is never being triggered (not loading anything), so I would like to know if I actually CAN do this. My code:
LoadLevelMap = (level) => {
this.load.json('level'+level, 'data/level'+level+'.json');
this.load.on('filecomplete-json-level'+level, (key, type, data) => {
console.log('json loaded')
this.load.image('scnMap'+level,'assets/images/Map'+level+'.png');
this.load.on('filecomplete-image-scnMap'+level, (key, type, data) => {
console.log("map loaded")
this['scnPlay'+level] = this.add.image(0,0), "scnMap"+level);
});
});
}
Any idea?
Thanks!