Spaces:
Running
Running
cutechicken
commited on
Update index.html
Browse files- 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 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
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 ?
|
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 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
|
|
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 |
// 아이템 그리기
|