Compare commits
6 Commits
c13cd2dc88
...
6f8c55a658
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f8c55a658 | ||
|
|
70f48c820c | ||
|
|
0bc85b9146 | ||
| d565a847e9 | |||
|
|
1ef439ed52 | ||
|
|
44c1314322 |
Binary file not shown.
@ -1,5 +1,4 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=Jersey+15&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
|
@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;
|
font-family: "Jersey 15", sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
<audio id="bgm" src="/assets/music/game.mp3" loop autoplay></audio>
|
<audio id="bgm" src="/assets/music/game.mp3" loop autoplay></audio>
|
||||||
<audio id="sfx" src="/assets/music/slash.mp3"></audio>
|
<audio id="sfx" src="/assets/music/slash.mp3"></audio>
|
||||||
<audio id="sfxhrt" src="/assets/music/hurt.mp3"></audio>
|
<audio id="sfxhrt" src="/assets/music/hurt.mp3"></audio>
|
||||||
<audio id="win" src="/assets/music/Super Mario Bros. Music - Level Complete.mp3"></audio>
|
|
||||||
<div class="container-first">
|
<div class="container-first">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="boss">
|
<div class="boss">
|
||||||
|
|||||||
@ -107,7 +107,9 @@ function selectAnswer(e){
|
|||||||
bgm.play()
|
bgm.play()
|
||||||
|
|
||||||
if(wrongCount >= maxWrong){
|
if(wrongCount >= maxWrong){
|
||||||
|
setTimeout(()=>{
|
||||||
showScore();
|
showScore();
|
||||||
|
}, 500);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,15 +127,13 @@ function showScore(){
|
|||||||
document.getElementById("h1").remove();
|
document.getElementById("h1").remove();
|
||||||
document.getElementById("h2").remove();
|
document.getElementById("h2").remove();
|
||||||
document.getElementById("h3").remove();
|
document.getElementById("h3").remove();
|
||||||
const bgm = document.getElementById("win");
|
|
||||||
bgm.play()
|
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
|
const bgm = document.getElementById("sfxhrt");
|
||||||
|
bgm.play()
|
||||||
const alerts = document.getElementById("scoreAlert")
|
const alerts = document.getElementById("scoreAlert")
|
||||||
alerts.textContent = `you scored ${score} out of 200 !`;
|
alerts.textContent = `you scored ${score} out of 200 !`;
|
||||||
}, 200);
|
}, 600);
|
||||||
setTimeout(()=> {
|
|
||||||
postScore(score);
|
postScore(score);
|
||||||
}, 3200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleNextBtn(){
|
function handleNextBtn(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user