ProPerNounpYK commited on
Commit
c703aea
ยท
verified ยท
1 Parent(s): 312ba0e

Update index.html

Browse files
Files changed (1) hide show
  1. 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 = {