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

Winning the game


Now that we have the goals showing, we now need some way in order to complete the project. With that in mind, let's create our goal:

  1. Create a new particle system by going into GameObject | Create Other | Particle System (in case of Unity 4.6, go to GameObject | Particle System). Change the name of the object to Goal.

  2. Under the Shape section, change the Shape variable to Box, and change Box X to 1 and Box Y and Box Z to 0.

  3. Click on the arrow on the right-hand side of Start Lifetime, and change the values to Random Between Two Constants. Change those values to 0 and 1. Do the same with Start Speed between 2 and 4. Make Start Size use random values between 0 and 0.5. Change Start Color to Random Between Two Colors using a green and purple color. Finally, uncheck the Play On Awake variable. Have a look at the following screenshot:

    With that, you should have a nice stream of particles coming in for your new goal object!

  4. Add in a box collider by selecting Component | Physics | Box...