Game adjusted to async file loading
This commit is contained in:
parent
f02fb4d411
commit
014152b011
|
@ -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);
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue