Skip to content

Commit

Permalink
fixed loading overlay bug
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraghazra committed Mar 16, 2019
1 parent 8972c11 commit 892c641
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions css/style.css
Expand Up @@ -94,7 +94,8 @@ button:hover {
height: 100vh;
text-align: center;
color: white;
background-color: rgb(90, 218, 139);
background-color: rgb(41, 196, 123);
z-index: 1;
}

.loading-wrapper {
Expand All @@ -105,7 +106,7 @@ button:hover {
margin: 20px auto;
border: 8px solid #f3f3f3;
border-radius: 50%;
border-top: 8px solid #34db95;
border-top: 8px solid #0a8653;
width: 50px;
height: 50px;
animation: spin 2s linear infinite;
Expand Down
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -15,7 +15,7 @@

<body>

<div class="overlay show" id="game-start">
<div class="overlay hide" id="game-start">
<div class="info">
<h2>Destroy All The Astroids</h2>
<h2 id="game-start-timer"></h2>
Expand Down
3 changes: 2 additions & 1 deletion js/Game.js
Expand Up @@ -17,7 +17,7 @@ class Game {
this.sounds = assets.sounds;
this.level = 1;
this.rockBreakRadius = 25;

this.domRestart = document.getElementById('game-restart');
this.domGamestart = document.getElementById('game-start');
this.domGamestartTimer = document.getElementById('game-start-timer');
Expand All @@ -29,6 +29,7 @@ class Game {
this.domGameWinLevel = document.getElementById('game-win-level');
this.domLevel.textContent = 'Level: ' + (this.level)

this.showStartScreen();
this.domRestart.addEventListener('click', () => {
this.restart();
});
Expand Down

0 comments on commit 892c641

Please sign in to comment.