mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Tilorswift can now load levels from file
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user