Skip to content

Commit

Permalink
Update game.js
Browse files Browse the repository at this point in the history
  • Loading branch information
PranjaliBhardwaj authored Jan 7, 2024
1 parent 342bf85 commit 25808bf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Light/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,22 @@ incrementScore = (num) => {
score += num;
scoreText.innerText = score;
};
var count=0;
function muteMe(elem) {
elem.muted = true;
elem.pause();
}

var playPauseBTN = document.getElementById('playpauseBTN')
function playpause(){
if(count==0){
count==1;
Audio.play();
}else{
count=0;
audio.pause();
[].slice.call(document.querySelectorAll('audio')).forEach(function(audio) {
Audio.muted = true;
});
}
}

0 comments on commit 25808bf

Please sign in to comment.