private void ToggleInventory() { InventoryGui.SetVisibility(!InventoryGui.GetVisibility()); InventoryBar.SetVisibility(!InventoryGui.GetVisibility()); IsInventoryOpened = InventoryGui.GetVisibility(); InventoryGui.DisplayItemsOnUI(PlayerInstance.PlayerInventory); InventoryBar.SetAllItems(InventoryGui.GetInventoryBar().GetAllItems()); }
private void OnItemAddedToPlayer(object o, ItemAddedEventArgs e) { InventoryGui.DisplayItemsOnUI(((Player)o).PlayerInventory); }