Show game over as overlay on top of game screen
- Make gameover-screen a fixed overlay with semi-transparent background - Removed 'screen' class from gameover-screen element - Game scene remains visible behind game over overlay
This commit is contained in:
+6
-1
@@ -72,6 +72,7 @@ class UIManager {
|
||||
}
|
||||
|
||||
handleBackToLobby() {
|
||||
this.hideGameOver();
|
||||
this.showScreen('room');
|
||||
}
|
||||
|
||||
@@ -119,7 +120,11 @@ class UIManager {
|
||||
this.displays.finalScores.appendChild(item);
|
||||
});
|
||||
|
||||
this.showScreen('gameover');
|
||||
this.screens.gameover.classList.add('active');
|
||||
}
|
||||
|
||||
hideGameOver() {
|
||||
this.screens.gameover.classList.remove('active');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user