O'Reilly logo

Creating Games with Unity and Maya by Adam Watkins

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

CHAPTER 16

Image

Unity: Creating Inventory Systems

Thus far we have created several weapons and tools (our flashlight, EMP, and pistol). However right now, in order to use any of the three, they have to be activated in the script manually before running the game. This, of course, is a useless method to the player. What we need to do is create an inventory system that allows the player to choose which tool he wants to use and when. This inventory system will also do the work behind the scenes of turning various tool functionality on and off in the scripts.

Right now, the gun is active even when placing an EMP. The flashlight is shining even when the ...

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