Tilorswift can now load levels from file

This commit is contained in:
Mal
2023-09-19 01:14:15 +02:00
parent 146f1f531e
commit 32a2c15551
7 changed files with 277 additions and 220 deletions

View File

@@ -3,14 +3,18 @@ export default class ImageLoader
images = [];
numberImagesLoaded = 0;
constructor() {
this.onLoad = () => {}
}
update()
{
this.numberImagesLoaded++;
if (this.numberImagesLoaded === this.images.length) {
window.dispatchEvent(new Event('imagesloaded'));
this.onLoad();
}
}
isComplete()