Update index.html
Browse files- index.html +15 -13
index.html
CHANGED
@@ -595,7 +595,7 @@ function buyTank(tankImg, cost, tankId) {
|
|
595 |
lastShot = now;
|
596 |
}
|
597 |
}
|
598 |
-
|
599 |
if(gameOver) return;
|
600 |
if(!isCountingDown) {
|
601 |
// ํ๋ ์ด์ด ์์ง์
|
@@ -608,11 +608,10 @@ function buyTank(tankImg, cost, tankId) {
|
|
608 |
fireBullet();
|
609 |
}
|
610 |
|
611 |
-
//
|
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 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
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 => {
|