mapa
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user