Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity Game Development Blueprints

You're reading from   Unity Game Development Blueprints Explore the various enticing features of Unity and learn how to develop awesome games

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781783553655
Length 318 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John P. Doran John P. Doran
Author Profile Icon John P. Doran
John P. Doran
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. 2D Twin-stick Shooter 2. Creating GUIs FREE CHAPTER 3. Side-scrolling Platformer 4. First Person Shooter Part 1 – Creating Exterior Environments 5. First Person Shooter Part 2 – Creating Interior Environments 6. First Person Shooter Part 3 – Implementing Gameplay and AI 7. Creating Save Files in Unity 8. Finishing Touches 9. Creating GUIs Part 2 – Unity's New GUI System Index

Creating collectibles


At this point, we have the basis of our game, but now, we need to add some gameplay to our world. Perhaps we will have it so that we need to collect all of the coins in the level, and then the goal will open:

  1. Create a new particle system by going to GameObject | Create Other | Particle System (in case of Unity 4.6, go to GameObject | Particle System). Change the name of the object to Collectible. Next, we need to assign the object's tag to Orb. To do so, select Tag | Add Tag. Once in the Tag menu, assign Element 0 as Orb, and press Enter. Select the Collectible game object in Hierarchy again, and then select Tag as Orb.

  2. Under the Shape section, change the Shape variable to Sphere and the Radius to 0.01.

  3. Click on the downward-facing arrow on the right-hand side of Start Lifetime, and change the values to Random Between Two Constants. Change those values to 0 and .2. Do the same with Start Speed between 0 and 1. Make Start Size use random values between 0 and 1.5.

  4. Under Start...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime