cutechicken commited on
Commit
66f04c8
Β·
verified Β·
1 Parent(s): 2939999

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +15 -13
index.html CHANGED
@@ -595,7 +595,7 @@ function buyTank(tankImg, cost, tankId) {
595
  lastShot = now;
596
  }
597
  }
598
- function updateGame() {
599
  if(gameOver) return;
600
  if(!isCountingDown) {
601
  // ν”Œλ ˆμ΄μ–΄ μ›€μ§μž„
@@ -608,11 +608,10 @@ function buyTank(tankImg, cost, tankId) {
608
  fireBullet();
609
  }
610
 
611
- // 여기에 BF109 κ΄€λ ¨ μ½”λ“œ μΆ”κ°€
612
  if (hasBF109 && !isCountingDown) {
613
  const now = Date.now();
614
  if (now - lastSupportSpawn > 10000) { // 10μ΄ˆλ§ˆλ‹€
615
- // 상단, 쀑단, ν•˜λ‹¨μ— μœ λ‹› 생성
616
  supportUnits.push(
617
  new SupportUnit(canvas.height * 0.2),
618
  new SupportUnit(canvas.height * 0.5),
@@ -620,17 +619,20 @@ function buyTank(tankImg, cost, tankId) {
620
  );
621
  lastSupportSpawn = now;
622
  }
623
- // 지원 μœ λ‹› μ—…λ°μ΄νŠΈ 및 ν™”λ©΄ λ°– μœ λ‹› 제거
624
- supportUnits = supportUnits.filter(unit => unit.update());
625
  }
626
- // JU87 κ΄€λ ¨ μ½”λ“œ μΆ”κ°€
627
- if (hasJU87 && !isCountingDown) {
628
- const now = Date.now();
629
- if (now - lastJU87Spawn > 15000) { // 15μ΄ˆλ§ˆλ‹€
630
- supportUnits.push(new JU87());
631
- lastJU87Spawn = now;
632
- }
633
- }
 
 
 
 
 
634
  enemies.forEach(enemy => enemy.update());
635
  if(!isCountingDown) {
636
  bullets = bullets.filter(bullet => {
 
595
  lastShot = now;
596
  }
597
  }
598
+ function updateGame() {
599
  if(gameOver) return;
600
  if(!isCountingDown) {
601
  // ν”Œλ ˆμ΄μ–΄ μ›€μ§μž„
 
608
  fireBullet();
609
  }
610
 
611
+ // BF109 κ΄€λ ¨ μ½”λ“œ
612
  if (hasBF109 && !isCountingDown) {
613
  const now = Date.now();
614
  if (now - lastSupportSpawn > 10000) { // 10μ΄ˆλ§ˆλ‹€
 
615
  supportUnits.push(
616
  new SupportUnit(canvas.height * 0.2),
617
  new SupportUnit(canvas.height * 0.5),
 
619
  );
620
  lastSupportSpawn = now;
621
  }
 
 
622
  }
623
+
624
+ // JU87 κ΄€λ ¨ μ½”λ“œ μΆ”κ°€
625
+ if (hasJU87 && !isCountingDown) {
626
+ const now = Date.now();
627
+ if (now - lastJU87Spawn > 15000) { // 15μ΄ˆλ§ˆλ‹€
628
+ supportUnits.push(new JU87());
629
+ lastJU87Spawn = now;
630
+ }
631
+ }
632
+
633
+ // λͺ¨λ“  지원 μœ λ‹› μ—…λ°μ΄νŠΈ (BF109와 JU87 λͺ¨λ‘ 처리)
634
+ supportUnits = supportUnits.filter(unit => unit.update());
635
+
636
  enemies.forEach(enemy => enemy.update());
637
  if(!isCountingDown) {
638
  bullets = bullets.filter(bullet => {