fix: Добавлено обновление значения текущего уровня в main.js
This commit is contained in:
+2
-1
@@ -42,7 +42,7 @@ import { createGameView, rebuildBrickViews, syncronizeViewsWithGame } from './vi
|
||||
|
||||
const game = new Game(LEVELS);
|
||||
const views = createGameView(game, container);
|
||||
const currentLevel = game.currentLevel;
|
||||
let currentLevel = game.currentLevel;
|
||||
|
||||
container.on('pointermove', (event) => {
|
||||
const localPosition = container.toLocal(event.global);
|
||||
@@ -54,6 +54,7 @@ import { createGameView, rebuildBrickViews, syncronizeViewsWithGame } from './vi
|
||||
|
||||
if (game.currentLevel !== currentLevel) {
|
||||
rebuildBrickViews(views, game, container);
|
||||
currentLevel = game.currentLevel;
|
||||
}
|
||||
syncronizeViewsWithGame(views, game);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user