Book Image

Unity Game Development Blueprints

By : John P. Doran
Book Image

Unity Game Development Blueprints

By: John P. Doran

Overview of this book

Table of Contents (16 chapters)
Unity Game Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
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...