Cover by Matt Smith, Chico Queiroz

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

O'Reilly logo

Managing inventories with a general purpose PickUp class

There are often several different kinds of items players are expected to pick up and collect during a game (keys, extra lives, items that score points, and so on). A general PickUp class to represent the properties for each pickup item can be very useful, and the GUI display of inventory items can be made straightforward using a C# List<T> collection of such objects.

Managing inventories with a general purpose PickUp class

Getting ready

In the 0423_04_13 folder you'll find a selection of images and icons for keys and hearts.

How to do it...

To display graphical icons for a general purpose inventory, please follow these steps:

  1. Create a new scene and add ...

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