Initial commit: Siege Protocol
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>
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
// ═══ 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() */ }
|
||||
Reference in New Issue
Block a user