diff options
-rw-r--r-- | html/tower/index.html | 20 | ||||
-rw-r--r-- | html/tower/js/game.js | 8 | ||||
-rw-r--r-- | html/tower/js/gameState.js | 1 |
3 files changed, 18 insertions, 11 deletions
diff --git a/html/tower/index.html b/html/tower/index.html index 04c31e6..4de010c 100644 --- a/html/tower/index.html +++ b/html/tower/index.html @@ -26,7 +26,7 @@ flex-shrink: 0; } .tower-palette { - width: 100px; + width: 160px; background: white; border: 2px solid #333; padding: 10px; @@ -36,14 +36,16 @@ flex-shrink: 0; } .tower-option { - width: 60px; + width: 140px; height: 75px; cursor: grab; position: relative; display: flex; - flex-direction: column; + flex-direction: row; + gap: 10px; align-items: center; - justify-content: center; + justify-content: flex-start; + padding: 5px; } .tower-option:active { cursor: grabbing; @@ -51,12 +53,17 @@ .tower-preview { width: 25px; height: 25px; - margin-bottom: 5px; + flex-shrink: 0; + } + .tower-info { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 2px; } .tower-name { font-size: 12px; font-weight: bold; - margin-bottom: 3px; } .tower-cost { font-size: 10px; @@ -65,7 +72,6 @@ .tower-ammo { font-size: 10px; color: #666; - margin-top: 2px; } .start-button { margin-top: 20px; diff --git a/html/tower/js/game.js b/html/tower/js/game.js index bcbbbb9..3549639 100644 --- a/html/tower/js/game.js +++ b/html/tower/js/game.js @@ -405,9 +405,11 @@ function populateTowerPalette() { towerOption.innerHTML = ` <div class="tower-preview" style="background: ${tower.color};"></div> - <div class="tower-name">${tower.name}</div> - <div class="tower-cost">$${tower.cost}</div> - <div class="tower-ammo">Ammo: ${tower.maxAmmo}</div> + <div class="tower-info"> + <div class="tower-name">${tower.name}</div> + <div class="tower-cost">Cost: $${tower.cost}</div> + <div class="tower-ammo">Ammo: ${tower.maxAmmo}</div> + </div> `; palette.appendChild(towerOption); diff --git a/html/tower/js/gameState.js b/html/tower/js/gameState.js index 861ecb3..f6da7aa 100644 --- a/html/tower/js/gameState.js +++ b/html/tower/js/gameState.js @@ -200,6 +200,5 @@ const gameState = { this.projectiles = []; this.particles = []; this.grid = Array(20).fill().map(() => Array(20).fill('empty')); - this.currency += 10; // Level completion bonus } }; \ No newline at end of file |