Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying NGUI for Unity
  • Table Of Contents Toc
NGUI for Unity

NGUI for Unity

By : Charles Bernardoff (EURO)
3.9 (14)
close
close
NGUI for Unity

NGUI for Unity

3.9 (14)
By: Charles Bernardoff (EURO)

Overview of this book

Table of Contents (14 chapters)
close
close

Summary


In this chapter, we used everything we learned in the earlier chapters with respect to creating a simple game.

We created an enemy spawning system, which instantiates enemies on the scene. Rigidbodies and colliders have been added to handle collisions between enemies in the barriers at the bottom of the screen.

We also added a health bar widget that is linked to health points; if four enemies touch the end of the screen, the game restarts.

The Update() method was used to handle player input and compare the typed word with destruct codes in order to destroy enemies if needed.

For now, the game is quite simple. Some ideas to enhance the game are as follows:

  • Add more self-destruct words

  • Display what the player types on the screen (visual feedback)

  • Slowly increase the spawning rate as the player destroys enemies

  • Slowly increase the enemy's speed as the player destroys enemies

  • Add a scoring system

  • Implement the Time power (hint: Time.timeScale)

  • Implement the Bomb power

  • Make the hack time depend on...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
NGUI for Unity
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon