O'Reilly logo

Mastering Unity 2D Game Development - Second Edition by Simon Jackson, Ashley Godbold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required