-
Book Overview & Buying
-
Table Of Contents
Unity Android Game Development by Example Beginner's Guide
By :
By giving our tank headlights, we give the player the ability to control the light in their world. Using cookies, we can make them look more interesting than just circles of light.
Start by creating a Spotlight.
Position the light in front of the tank and pointing away.
In the Inspector window, increase the value of the Intensity attribute to three. This will make our headlights bright like real headlights.
Now we need some cookie textures. At the top of the Unity Editor, select Assets, followed by Import Package, and lastly Light Cookies.
On the new window, select Import and wait for the loading bar to finish.
We now have a few options to choose from. Inside the Standard Assets folder, a new folder was created, Light Cookies that contains the new textures. Drag Flashlight from the Project window and drop it onto the Cookie field on the Spotlight in the Inspector window. It is as simple as that to add a cookie to a light.
To finish it off, duplicate the light...
Change the font size
Change margin width
Change background colour