cutechicken commited on
Commit
2cf801f
ยท
verified ยท
1 Parent(s): 4bacd58

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +8 -10
index.html CHANGED
@@ -514,13 +514,13 @@
514
  sound.play();
515
 
516
  // ๋ฐœ์‚ฌ ์ดํŽ™ํŠธ ์ถ”๊ฐ€
517
- effects.push(new Effect(
518
  this.x + Math.cos(this.angle) * 30,
519
  this.y + Math.sin(this.angle) * 30,
520
  500,
521
  'fire',
522
  this.angle,
523
- this // ์ž์‹ ์„ ๋ถ€๋ชจ๋กœ ์ „๋‹ฌ
524
  ));
525
 
526
  bullets.push({
@@ -604,16 +604,15 @@ function initRound() {
604
  supportUnits = [];
605
  lastSupportSpawn = 0;
606
 
607
- if (currentStage === 2) {
608
- const newBackgroundImg = new Image();
609
- newBackgroundImg.src = 'city2.png';
610
- newBackgroundImg.onload = () => {
611
- backgroundImg.src = 'city2.png';
612
- };
613
  bgm.pause();
614
  bgm.src = 'BGM3.ogg';
615
  bgm.play();
616
- }
 
 
617
 
618
  startCountdown();
619
 
@@ -791,7 +790,6 @@ function initRound() {
791
  }
792
  }
793
  }
794
- enemies.forEach(enemy => enemy.update());
795
  }
796
  function spawnHealthItem(x, y) {
797
  items.push({x, y});
 
514
  sound.play();
515
 
516
  // ๋ฐœ์‚ฌ ์ดํŽ™ํŠธ ์ถ”๊ฐ€
517
+ effects.push(new Effect(
518
  this.x + Math.cos(this.angle) * 30,
519
  this.y + Math.sin(this.angle) * 30,
520
  500,
521
  'fire',
522
  this.angle,
523
+ this
524
  ));
525
 
526
  bullets.push({
 
604
  supportUnits = [];
605
  lastSupportSpawn = 0;
606
 
607
+ if (currentStage === 2) {
608
+ backgroundImg.onload = () => {
609
+ // ์ด๋ฏธ์ง€ ๋กœ๋”ฉ์ด ์™„๋ฃŒ๋œ ํ›„ BGM ๋ณ€๊ฒฝ
 
 
 
610
  bgm.pause();
611
  bgm.src = 'BGM3.ogg';
612
  bgm.play();
613
+ };
614
+ backgroundImg.src = 'city2.png';
615
+ }
616
 
617
  startCountdown();
618
 
 
790
  }
791
  }
792
  }
 
793
  }
794
  function spawnHealthItem(x, y) {
795
  items.push({x, y});