Spaces:
Running
Running
cutechicken
commited on
Update index.html
Browse files- index.html +5 -5
index.html
CHANGED
@@ -249,6 +249,7 @@
|
|
249 |
const hitSounds = Array.from({length: 6}, (_, i) => new Audio(`hit${i+1}.ogg`));
|
250 |
const reloadSounds = [new Audio('reload1.ogg'), new Audio('reload2.ogg')];
|
251 |
const escapeSound = new Audio('escape.ogg');
|
|
|
252 |
bgm.loop = true;
|
253 |
enemyFireSound.volume = 0.5;
|
254 |
|
@@ -965,8 +966,8 @@ function updateGame() {
|
|
965 |
|
966 |
fireBullet();
|
967 |
}
|
968 |
-
|
969 |
-
|
970 |
gameOver = true;
|
971 |
restartBtn.style.display = 'block';
|
972 |
effects.push(new Effect(player.x, player.y, 1000, 'death'));
|
@@ -978,9 +979,8 @@ function updateGame() {
|
|
978 |
// ์ฌ๋ง ํจ๊ณผ์ ์ฌ์
|
979 |
deathSound.play();
|
980 |
|
981 |
-
// escape
|
982 |
-
|
983 |
-
escapeSound.volume = 1.0; // ๋ณผ๋ฅจ ์ค์
|
984 |
escapeSound.play();
|
985 |
}
|
986 |
// BF109 ๊ด๋ จ ์ฝ๋
|
|
|
249 |
const hitSounds = Array.from({length: 6}, (_, i) => new Audio(`hit${i+1}.ogg`));
|
250 |
const reloadSounds = [new Audio('reload1.ogg'), new Audio('reload2.ogg')];
|
251 |
const escapeSound = new Audio('escape.ogg');
|
252 |
+
|
253 |
bgm.loop = true;
|
254 |
enemyFireSound.volume = 0.5;
|
255 |
|
|
|
966 |
|
967 |
fireBullet();
|
968 |
}
|
969 |
+
//ํ๋ ์ด์ด ์ฌ๋ง์ ์๋ฆฌ ์ฌ์ ๋ถ๋ถ
|
970 |
+
if(player.health <= 0) {
|
971 |
gameOver = true;
|
972 |
restartBtn.style.display = 'block';
|
973 |
effects.push(new Effect(player.x, player.y, 1000, 'death'));
|
|
|
979 |
// ์ฌ๋ง ํจ๊ณผ์ ์ฌ์
|
980 |
deathSound.play();
|
981 |
|
982 |
+
// escape ํจ๊ณผ์ ์ฌ์
|
983 |
+
escapeSound.volume = 1.0;
|
|
|
984 |
escapeSound.play();
|
985 |
}
|
986 |
// BF109 ๊ด๋ จ ์ฝ๋
|