622a9fd170
Inverted tower-defense browser game — deploy enemies yourself, tower auto-kills them, pocket credits, upgrade weapons. HTML + Canvas + vanilla JS, no build step. Co-Authored-By: claude-flow <ruv@ruv.net>
25 lines
582 B
JavaScript
25 lines
582 B
JavaScript
// ═══ shop.js ═══
|
|
// ============================================================
|
|
// SHOP.JS — Shop state management (canvas draws each frame)
|
|
// ============================================================
|
|
|
|
function openShop() {
|
|
if (G.gameOver) return;
|
|
G.shopOpen = true;
|
|
_shopScrollY = 0;
|
|
setPaused(true, false);
|
|
}
|
|
|
|
function closeShop() {
|
|
G.shopOpen = false;
|
|
_shopScrollY = 0;
|
|
setPaused(false);
|
|
}
|
|
|
|
function setShopTab(tab) {
|
|
G.shopTab = tab;
|
|
_shopScrollY = 0;
|
|
}
|
|
|
|
function renderShop() { /* canvas draws shop each frame via drawShopOverlay() */ }
|