O'Reilly logo

NGUI for Unity by Charles Bernardoff

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 7. Creating a Game with NGUI

In this final chapter, we will create a game using NGUI elements, and this will ensure that you understand them and know how to use them perfectly.

Together, we will learn how to create these basic game rules, which are as follows:

  1. Enemies fall down from the top of our scrollable viewport.
  2. The player drops Barriers on the Viewport—if the enemy collides with a built Barrier, he or she is destroyed along with the Barrier.
  3. Some enemies have encrypted self-destruct code. The player clicks on the enemy to hack it. When the hacking process is complete, its destruct code is displayed above it.
  4. The player must type in the code to destroy the enemy.

We will also add a health bar that will represent the player's health points ...

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