cutechicken commited on
Commit
e3f649a
·
verified ·
1 Parent(s): 2303d44

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +15 -14
index.html CHANGED
@@ -110,13 +110,13 @@
110
  <p style="color: #ff6b6b;">-30% Speed</p>
111
  <button onclick="buyTank('player3.png', 500, 'tank2')">Buy</button>
112
  </div>
113
- <div id="apcr" style="text-align:center;">
114
- <h3>APCR</h3>
115
- <img src="apcr.png" width="50" height="50">
116
- <p>1000 Gold</p>
117
- <p style="color: #4CAF50;">+50% Bullet Speed</p>
118
- <button onclick="buyAPCR()">Buy</button>
119
- </div>
120
  </div>
121
  </div>
122
  <button id="bossButton" class="button">Fight Boss!</button>
@@ -404,7 +404,7 @@ function buyTank(tankImg, cost, tankId) {
404
  x: player.x + Math.cos(player.angle) * 30,
405
  y: player.y + Math.sin(player.angle) * 30,
406
  angle: player.angle,
407
- speed: hasAPCR ? 15 : 10, // APCR 적용 시 50% 증가
408
  isEnemy: false,
409
  damage: weapon.damage,
410
  size: weapon.bulletSize,
@@ -539,12 +539,13 @@ function buyTank(tankImg, cost, tankId) {
539
  ctx.arc(bullet.x, bullet.y, bullet.size, 0, Math.PI * 2);
540
  ctx.fill();
541
  } else {
542
- ctx.save();
543
- ctx.translate(bullet.x, bullet.y);
544
- ctx.rotate(bullet.angle);
545
- const size = currentWeapon === 'machinegun' ? 25 : 50; // 기관총일 크기 절반
546
- ctx.drawImage(bulletImg, -size/2, -size/2, size, size);
547
- ctx.restore();
 
548
  }
549
  });
550
  // 아이템 그리기
 
110
  <p style="color: #ff6b6b;">-30% Speed</p>
111
  <button onclick="buyTank('player3.png', 500, 'tank2')">Buy</button>
112
  </div>
113
+ <div id="apcr" style="text-align:center;">
114
+ <h3>APCR</h3>
115
+ <img src="apcr.png" width="50" height="100"> <!-- 여기를 50x100으로 수정 -->
116
+ <p>1000 Gold</p>
117
+ <p style="color: #4CAF50;">+100% Bullet Speed</p>
118
+ <button onclick="buyAPCR()">Buy</button>
119
+ </div>
120
  </div>
121
  </div>
122
  <button id="bossButton" class="button">Fight Boss!</button>
 
404
  x: player.x + Math.cos(player.angle) * 30,
405
  y: player.y + Math.sin(player.angle) * 30,
406
  angle: player.angle,
407
+ speed: hasAPCR ? 20 : 10, // APCR 적용 시 100% 증가
408
  isEnemy: false,
409
  damage: weapon.damage,
410
  size: weapon.bulletSize,
 
539
  ctx.arc(bullet.x, bullet.y, bullet.size, 0, Math.PI * 2);
540
  ctx.fill();
541
  } else {
542
+ ctx.save();
543
+ ctx.translate(bullet.x, bullet.y);
544
+ ctx.rotate(bullet.angle);
545
+ const width = 20; // apcr2.png 너비를 20으로 설정
546
+ const height = 10; // apcr2.png 높이를 10으로 설정
547
+ ctx.drawImage(bulletImg, -width/2, -height/2, width, height);
548
+ ctx.restore();
549
  }
550
  });
551
  // 아이템 그리기