mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:55:35 +00:00
Ability to switch weapons through the menu
This commit is contained in:
parent
12b8d4a70f
commit
ff6d46ebcd
11 changed files with 61 additions and 4 deletions
|
|
@ -43,6 +43,8 @@ public partial class ItemsMenu : ItemList
|
|||
{
|
||||
var item = _itemsDic[index];
|
||||
GD.Print("Item: " + item);
|
||||
|
||||
_inventoryManager.UseItem(item);
|
||||
|
||||
HideInventory();
|
||||
}
|
||||
|
|
@ -57,9 +59,10 @@ public partial class ItemsMenu : ItemList
|
|||
public void ShowInventory()
|
||||
{
|
||||
this.Show();
|
||||
foreach (var itm in _inventoryManager.Items)
|
||||
foreach (var item in _inventoryManager.Items)
|
||||
{
|
||||
var item = itm.Value;
|
||||
if (item.Count <= 0) continue;
|
||||
|
||||
var index = this.AddItem($"{item.Item.ItemName} x{item.Count}", item.Item.InventorySprite,
|
||||
item.Item.Selectable);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue