Skip to content

Commit

Permalink
Merge pull request #167 from Archisman141/firing_feature_improved
Browse files Browse the repository at this point in the history
Firing Feature Improved
  • Loading branch information
YadavAkhileshh authored Oct 8, 2024
2 parents b533563 + 8b4cae5 commit 5cc23ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
18 changes: 0 additions & 18 deletions Alien.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,16 +405,6 @@
}
}

function restart() {
gameOverElement.style.display = "none";
restartButton.style.display = "none";
updatePauseButton();
gameActive = true;
initGame();
backgroundMusic.play(); // Play background music when restarting the game
update();
}

startButton.addEventListener("click", startGame);
restartButton.addEventListener("click", startGame);

Expand Down Expand Up @@ -502,14 +492,6 @@
}
}
});


// Restart game on button click
restartButton.addEventListener("click", restart);
pauseButton.addEventListener("click", () => {
gamePaused = false;
restoreGameState();
update();
pauseButton.style.display = 'none';
});

Expand Down

0 comments on commit 5cc23ad

Please sign in to comment.