This commit is contained in:
2025-12-07 21:31:44 +01:00
parent 4a0ca267ea
commit 974141c08c
52 changed files with 2485 additions and 397 deletions

View File

@@ -68,9 +68,25 @@ class InventorySystem {
}
}
this.updateUI();
this.updateUI();
return false; // Not enough items
}
getItemCount(type) {
let total = 0;
for (const slot of this.slots) {
if (slot && slot.type === type) {
total += slot.count;
}
}
return total;
}
addGold(amount) {
this.gold += amount;
this.updateUI();
}
updateUI() {
const uiScene = this.scene.scene.get('UIScene');
if (uiScene) {