Creating a shop and inventory
As with other areas in this book, we will just keep things simple when implementing the sample project. You can always extend or replace it later if you wish.
We will also look at two slightly different approaches: using a scene for the shop and a layer system for the inventory.
Gathering shop assets
The shop will contain various healing items for the player to purchase. To create the shop, we'll just create a new scene to keep things simple as we expect to enter a shop and leave it when we are done.
I altered the assets I used to make the HUD for the battle system to create a new menu that will be used for the shop. I also added a talk bubble, which we will use for the shopkeep to speak to us and show us what we are buying. We'll layout the individual buttons and slots within Unity. The following screenshot shows the buttons, bubbles, and other things that we are going to use:
For items to show in the shop, I turned back to Kenney on OpenGamAart.Org (who made...