Spaces:
Running
Running
Update index.html
Browse files- index.html +18 -18
index.html
CHANGED
@@ -374,24 +374,24 @@
|
|
374 |
}
|
375 |
return true;
|
376 |
});
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
function spawnHealthItem(x, y) {
|
396 |
items.push({x, y});
|
397 |
}
|
|
|
374 |
}
|
375 |
return true;
|
376 |
});
|
377 |
+
if(enemies.length === 0) {
|
378 |
+
if (!isBossStage) {
|
379 |
+
if(currentRound < 10) {
|
380 |
+
nextRoundBtn.style.display = 'block';
|
381 |
+
showShop();
|
382 |
+
} else {
|
383 |
+
document.getElementById('bossButton').style.display = 'block';
|
384 |
+
}
|
385 |
+
} else {
|
386 |
+
gameOver = true;
|
387 |
+
document.getElementById('winMessage').style.display = 'block';
|
388 |
+
restartBtn.style.display = 'block';
|
389 |
+
bgm.pause();
|
390 |
+
}
|
391 |
+
}
|
392 |
+
}
|
393 |
+
enemies.forEach(enemy => enemy.update());
|
394 |
+
}
|
395 |
function spawnHealthItem(x, y) {
|
396 |
items.push({x, y});
|
397 |
}
|