Spaces:
Running
Running
cutechicken
commited on
Update index.html
Browse files- index.html +8 -16
index.html
CHANGED
@@ -457,29 +457,21 @@ if(enemies.length === 0) {
|
|
457 |
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
458 |
}
|
459 |
}
|
|
|
|
|
|
|
|
|
|
|
460 |
|
461 |
-
|
462 |
-
updateGame();
|
463 |
-
drawGame();
|
464 |
-
requestAnimationFrame(gameLoop);
|
465 |
-
}
|
466 |
-
|
467 |
-
nextRoundBtn.addEventListener('click', () => {
|
468 |
-
currentRound++;
|
469 |
-
nextRoundBtn.style.display = 'none';
|
470 |
-
document.getElementById('shop').style.display = 'none';
|
471 |
-
initRound();
|
472 |
-
});
|
473 |
-
|
474 |
-
bossButton.addEventListener('click', startBossStage);
|
475 |
-
|
476 |
-
nextRoundBtn.addEventListener('click', () => {
|
477 |
currentRound++;
|
478 |
nextRoundBtn.style.display = 'none';
|
479 |
document.getElementById('shop').style.display = 'none'; // 상점 창 닫기
|
480 |
initRound();
|
481 |
});
|
482 |
|
|
|
|
|
483 |
restartBtn.addEventListener('click', () => {
|
484 |
currentRound = 1;
|
485 |
gameOver = false;
|
|
|
457 |
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
458 |
}
|
459 |
}
|
460 |
+
function gameLoop() {
|
461 |
+
updateGame();
|
462 |
+
drawGame();
|
463 |
+
requestAnimationFrame(gameLoop);
|
464 |
+
}
|
465 |
|
466 |
+
nextRoundBtn.addEventListener('click', () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
currentRound++;
|
468 |
nextRoundBtn.style.display = 'none';
|
469 |
document.getElementById('shop').style.display = 'none'; // 상점 창 닫기
|
470 |
initRound();
|
471 |
});
|
472 |
|
473 |
+
bossButton.addEventListener('click', startBossStage);
|
474 |
+
|
475 |
restartBtn.addEventListener('click', () => {
|
476 |
currentRound = 1;
|
477 |
gameOver = false;
|