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 => {