Spaces:
Running
Running
Update index.html
Browse files- index.html +3 -0
index.html
CHANGED
|
@@ -134,6 +134,9 @@ player.image.src = player.imageRight;
|
|
| 134 |
let gameOver = false;
|
| 135 |
|
| 136 |
function spawnEnemy() {
|
|
|
|
|
|
|
|
|
|
| 137 |
if (gameStarted && !gameOver && enemies.length < enemiesRemaining) {
|
| 138 |
const side = Math.random() < 0.5 ? 0 : canvas.width;
|
| 139 |
const enemy = {
|
|
|
|
| 134 |
let gameOver = false;
|
| 135 |
|
| 136 |
function spawnEnemy() {
|
| 137 |
+
if (enemies.length >= 10) { // ๋์์ ์กด์ฌํ ์ ์๋ ์ ์ ์ ์ ํ
|
| 138 |
+
return;
|
| 139 |
+
}
|
| 140 |
if (gameStarted && !gameOver && enemies.length < enemiesRemaining) {
|
| 141 |
const side = Math.random() < 0.5 ? 0 : canvas.width;
|
| 142 |
const enemy = {
|