O'Reilly logo

Building an RPG with Unity 5.x by Vahé Karamian

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

Inventory items and the Player Character

Now that we have seen how to create the Inventory System, we need to be able to utilize it during game play to apply changes to our player character. In this section, we are going to examine how to do just that!

Here are some of the new features we need to work on:

  • Applying selected inventory items to the player character
  • Performing accounting on both the player character and the inventory system
  • Updating the game state accordingly

Applying inventory items

We need to make some design decisions about how we are going to handle applying the inventory items to the player character, and in turn how the system will handle the event. For instance, let's assume the player character has acquired several weapons, let's ...

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