From faa9a25f9fd4129a970a2b86f89e58df3ccaeea5 Mon Sep 17 00:00:00 2001 From: elioat Date: Sun, 16 Feb 2025 22:55:15 -0500 Subject: * --- html/tower/index.html | 20 +++++++++++++------- html/tower/js/game.js | 8 +++++--- html/tower/js/gameState.js | 1 - 3 files changed, 18 insertions(+), 11 deletions(-) (limited to 'html') 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 = `
-
${tower.name}
-
$${tower.cost}
-
Ammo: ${tower.maxAmmo}
+
+
${tower.name}
+
Cost: $${tower.cost}
+
Ammo: ${tower.maxAmmo}
+
`; 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 -- cgit 1.4.1-2-gfad0