cutechicken commited on
Commit
00d7adf
ยท
verified ยท
1 Parent(s): ee65c36

Update index.html

Browse files
Files changed (1) hide show
  1. 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
- deathSound.cloneNode().play();
970
- escapeSound.play(); // ์‚ฌ๋ง ์‹œ escape.ogg ์žฌ์ƒ
 
 
 
 
 
 
 
 
 
 
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) {