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 17

Images

Health Systems, Winning, and Losing the Game

The game is playable. But the player is in that strange limbo of being unable to win and unable to lose. In this chapter we will look at enabling the player to do both.

Winning will actually be very simple—if the player gets to the end of the level (at the bottom of the stairs) alive, he wins. This means that if we have a trigger down there, when the player passes through it, we can launch the “Congratulations! You Win!” level. We’ll further flesh out that tutorial with script to allow for the game to be quit or restarted.

Losing is actually a bit tougher, but allows us opportunities to ...

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