mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Game adjusted to async file loading
This commit is contained in:
@@ -91,8 +91,9 @@ let game;
|
||||
const urlGetter = new UrlParam();
|
||||
const levelIndex = urlGetter.getInt('level');
|
||||
|
||||
loadLevel(
|
||||
Level.createFromFile(
|
||||
Setting.LEVELS_LOCATION + LEVEL[levelIndex < 0 || levelIndex >= LEVEL.length ? 0 : levelIndex]
|
||||
)
|
||||
Setting.LEVELS_LOCATION + LEVEL[levelIndex < 0 || levelIndex >= LEVEL.length ? 0 : levelIndex],
|
||||
(level) => {
|
||||
loadLevel(level);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user