cutechicken commited on
Commit
55100bc
ยท
verified ยท
1 Parent(s): 5c67727

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +35 -33
index.html CHANGED
@@ -374,25 +374,21 @@
374
  }
375
  return true;
376
  });
377
-
378
- if(enemies.length === 0) {
379
- if (!isBossStage) {
380
- if(currentRound < 10) {
381
- nextRoundBtn.style.display = 'block';
382
- showShop();
383
- } else {
384
- document.getElementById('bossButton').style.display = 'block';
385
- }
386
- } else {
387
- gameOver = true;
388
- document.getElementById('winMessage').style.display = 'block';
389
- rest
390
- gameOver = true;
391
- document.getElementById('winMessage').style.display = 'block';
392
- restartBtn.style.display = 'block';
393
- bgm.pause();
394
- }
395
- }
396
  }
397
  }
398
 
@@ -477,20 +473,26 @@
477
 
478
  bossButton.addEventListener('click', startBossStage);
479
 
480
- restartBtn.addEventListener('click', () => {
481
- currentRound = 1;
482
- gameOver = false;
483
- isBossStage = false;
484
- gold = 0;
485
- restartBtn.style.display = 'none';
486
- document.getElementById('winMessage').style.display = 'none';
487
- document.getElementById('tank1').style.display = 'block';
488
- document.getElementById('tank2').style.display = 'block';
489
- playerImg.src = 'player.png';
490
- bgm.play();
491
- initRound();
492
- });
493
-
 
 
 
 
 
 
494
  Promise.all([
495
  new Promise(resolve => backgroundImg.onload = resolve),
496
  new Promise(resolve => playerImg.onload = resolve),
 
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
  }
394
 
 
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;
486
+ isBossStage = false;
487
+ gold = 0;
488
+ restartBtn.style.display = 'none';
489
+ document.getElementById('winMessage').style.display = 'none';
490
+ document.getElementById('tank1').style.display = 'block';
491
+ document.getElementById('tank2').style.display = 'block';
492
+ playerImg.src = 'player.png';
493
+ bgm.play();
494
+ initRound();
495
+ });
496
  Promise.all([
497
  new Promise(resolve => backgroundImg.onload = resolve),
498
  new Promise(resolve => playerImg.onload = resolve),