I have a inventory and I need to add a hotbar to access certain items.
What this hotbar needs to do is when in the inventory "Menu" you add items to it and when you close the menu the hotbar moves to the bottom of the screen and you select and item, weapon, food ect, and can use it (like in Minecraft).
My problem is I don't know whether I should:
Keep track of which items are in hotbar "spaces" of the inventory and use them accordingly, or
Make a separate list for hotbar items and move them between the inventory and hotbar lists when needed
or a third way I did not even think of.
My inventory works by having items in a list. The item class has values such as dmg, uses, name, etc. I have an item data class I put on GameObjects that has a public
item variable. I have an inventory UI class that takes the inventory list and displays them.