cutechicken commited on
Commit
90babb0
·
verified ·
1 Parent(s): a1d0412

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +12 -8
index.html CHANGED
@@ -327,7 +327,8 @@
327
  shoot() {
328
  if (!this.hasPlayedMGSound) {
329
  const mgSound = new Audio('ju87mg.ogg');
330
- mgSound.volume = 1.0;
 
331
  mgSound.play().catch(error => console.error('Audio play failed:', error));
332
  this.hasPlayedMGSound = true;
333
  }
@@ -542,7 +543,7 @@ function buyTank(tankImg, cost, tankId) {
542
  lastJU87Spawn = Date.now(); // 구매 즉시 스폰 타이머 초기화
543
  }
544
  }
545
- function initRound() {
546
  enemies = [];
547
  for(let i = 0; i < 1 * currentRound; i++) {
548
  enemies.push(new Enemy());
@@ -553,13 +554,16 @@ function buyTank(tankImg, cost, tankId) {
553
  supportUnits = [];
554
  lastSupportSpawn = 0;
555
 
556
- // JU87 초기 스폰
557
- if (hasJU87) {
558
- supportUnits.push(new JU87());
559
- lastJU87Spawn = Date.now();
560
- }
561
-
562
  startCountdown();
 
 
 
 
 
 
 
 
563
  }
564
  function startBossStage() {
565
  isBossStage = true;
 
327
  shoot() {
328
  if (!this.hasPlayedMGSound) {
329
  const mgSound = new Audio('ju87mg.ogg');
330
+ mgSound.volume = 1.0; // 볼륨을 최대로 설정
331
+ mgSound.currentTime = 0;
332
  mgSound.play().catch(error => console.error('Audio play failed:', error));
333
  this.hasPlayedMGSound = true;
334
  }
 
543
  lastJU87Spawn = Date.now(); // 구매 즉시 스폰 타이머 초기화
544
  }
545
  }
546
+ function initRound() {
547
  enemies = [];
548
  for(let i = 0; i < 1 * currentRound; i++) {
549
  enemies.push(new Enemy());
 
554
  supportUnits = [];
555
  lastSupportSpawn = 0;
556
 
557
+ // 카운트다운 시작
 
 
 
 
 
558
  startCountdown();
559
+
560
+ // 카운트다운이 끝나면 JU87 스폰
561
+ setTimeout(() => {
562
+ if (hasJU87) {
563
+ supportUnits.push(new JU87());
564
+ lastJU87Spawn = Date.now();
565
+ }
566
+ }, 3000); // 3초 후에 스폰
567
  }
568
  function startBossStage() {
569
  isBossStage = true;