Spaces:
Running
Running
cutechicken
commited on
Update index.html
Browse files- index.html +9 -9
index.html
CHANGED
@@ -254,15 +254,15 @@
|
|
254 |
document.getElementById('shop').style.display = 'block';
|
255 |
}
|
256 |
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
|
267 |
function initRound() {
|
268 |
enemies = [];
|
|
|
254 |
document.getElementById('shop').style.display = 'block';
|
255 |
}
|
256 |
|
257 |
+
function buyTank(tankImg, cost, tankId) {
|
258 |
+
if (gold >= cost) {
|
259 |
+
gold -= cost;
|
260 |
+
playerImg.src = tankImg;
|
261 |
+
document.getElementById(tankId).style.display = 'none';
|
262 |
+
document.getElementById('shop').style.display = 'none';
|
263 |
+
// initRound() 호출 제거
|
264 |
+
}
|
265 |
+
}
|
266 |
|
267 |
function initRound() {
|
268 |
enemies = [];
|