add preloadThenStart
@@ -17,6 +17,19 @@ class Game
17
17
GameInput.g_init();
18
18
}
19
19
20
preloadImagesThenStart(imageData)
21
{
22
const cont = async () => {
23
await game.preloadImages(
24
imageData
25
);
26
27
game.startGame();
28
}
29
30
cont.apply();
31
}
32
20
33
async preloadImages(imagesData) {
21
34
const promises = [];
22
35
const context = this;
@@ -17,6 +17,19 @@ class Game17
GameInput.g_init();17
GameInput.g_init();18
}18
}19
19
20
preloadImagesThenStart(imageData)21
{22
const cont = async () => {23
await game.preloadImages(24
imageData25
);26
27
game.startGame();28
}29
30
cont.apply();31
}32
20
async preloadImages(imagesData) {33
async preloadImages(imagesData) {21
const promises = [];34
const promises = [];22
const context = this;35
const context = this;