Skip to Main Content
Unity in Action, Second Edition
book

Unity in Action, Second Edition

by Joseph Hocking
April 2018
Intermediate to advanced content levelIntermediate to advanced
400 pages
11h
English
Manning Publications
Content preview from Unity in Action, Second Edition

9 Adding interactive devices and items within the game

This chapter covers

  • Programming doors that the player can open
  • Enabling physics simulations that scatter a stack of boxes
  • Building collectible items that players store in their inventory
  • Using code to manage game state, such as inventory data
  • Equipping and using inventory items

Implementing functional items is the next topic we’re going to focus on. Previous chapters covered a number of different elements of a complete game: movement, enemies, the UI, and so forth. But our projects have lacked anything to interact with other than enemies, nor have they had much in the way of game state. In this chapter, you’ll learn how to create functional devices like doors. We’ll also discuss collecting ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unity Game Optimization - Third Edition

Unity Game Optimization - Third Edition

Dr. Davide Aversa, Chris Dickinson
Unity Game Development Cookbook

Unity Game Development Cookbook

Paris Buttfield-Addison, Jon Manning, Tim Nugent

Publisher Resources

ISBN: 9781617294969Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link