diff --git a/src/assets/music/Super Mario Bros. Music - Level Complete.mp3 b/src/assets/music/Super Mario Bros. Music - Level Complete.mp3 new file mode 100644 index 0000000..77e26d9 Binary files /dev/null and b/src/assets/music/Super Mario Bros. Music - Level Complete.mp3 differ diff --git a/src/css/global.css b/src/css/global.css index c876a81..deaae3c 100644 --- a/src/css/global.css +++ b/src/css/global.css @@ -1,4 +1,5 @@ @import url('https://fonts.googleapis.com/css2?family=Jersey+15&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap'); + *{ font-family: "Jersey 15", sans-serif; margin: 0; diff --git a/src/game/firstperson.html b/src/game/firstperson.html index 3255516..1a0e96e 100644 --- a/src/game/firstperson.html +++ b/src/game/firstperson.html @@ -16,6 +16,7 @@ +
diff --git a/src/js/firstperson.js b/src/js/firstperson.js index aad41bb..fc13ea9 100644 --- a/src/js/firstperson.js +++ b/src/js/firstperson.js @@ -107,9 +107,7 @@ function selectAnswer(e){ bgm.play() if(wrongCount >= maxWrong){ - setTimeout(()=>{ - showScore(); - }, 500); + showScore(); return; } } @@ -127,13 +125,15 @@ function showScore(){ document.getElementById("h1").remove(); document.getElementById("h2").remove(); document.getElementById("h3").remove(); + const bgm = document.getElementById("win"); + bgm.play() setTimeout(()=> { - const bgm = document.getElementById("sfxhrt"); - bgm.play() const alerts = document.getElementById("scoreAlert") alerts.textContent = `you scored ${score} out of 200 !`; - }, 600); - postScore(score); + }, 200); + setTimeout(()=> { + postScore(score); + }, 3200); } function handleNextBtn(){