Spaces:
Running
Running
Update index.html
Browse files- index.html +13 -3
index.html
CHANGED
@@ -961,13 +961,23 @@ function updateGame() {
|
|
961 |
|
962 |
fireBullet();
|
963 |
}
|
964 |
-
|
965 |
if(player.health <= 0) {
|
966 |
gameOver = true;
|
967 |
restartBtn.style.display = 'block';
|
968 |
effects.push(new Effect(player.x, player.y, 1000, 'death'));
|
969 |
-
|
970 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
971 |
}
|
972 |
// BF109 ๊ด๋ จ ์ฝ๋
|
973 |
if (hasBF109 && !isCountingDown) {
|
|
|
961 |
|
962 |
fireBullet();
|
963 |
}
|
964 |
+
// ํ
์คํธ์ค, ์๋๋ฉด ์ญ์
|
965 |
if(player.health <= 0) {
|
966 |
gameOver = true;
|
967 |
restartBtn.style.display = 'block';
|
968 |
effects.push(new Effect(player.x, player.y, 1000, 'death'));
|
969 |
+
|
970 |
+
// BGM ์ ์ง
|
971 |
+
bgm.pause();
|
972 |
+
bgm.currentTime = 0;
|
973 |
+
|
974 |
+
// ์ฌ๋ง ํจ๊ณผ์ ์ฌ์
|
975 |
+
deathSound.play();
|
976 |
+
|
977 |
+
// escape.ogg ์ฌ์
|
978 |
+
const escapeSound = new Audio('escape.ogg');
|
979 |
+
escapeSound.volume = 1.0; // ๋ณผ๋ฅจ ์ค์
|
980 |
+
escapeSound.play();
|
981 |
}
|
982 |
// BF109 ๊ด๋ จ ์ฝ๋
|
983 |
if (hasBF109 && !isCountingDown) {
|