Game Development Reference
In-Depth Information
Step 41. Now you will need something to reduce the health of the
player in order to see the changing effect in the GUI. Select Assets >
Import Package > Particles from the main menu.
Step 42. In the Project, locate the Fire1 prefab in the Standard
Assets > Particles > Fire folder and drag it into the Scene as shown
in Figure 6.14 .
FIG 6.14 Adding a fire particle system to a scene.
Step 43. While Fire1 is selected in the Hierarchy the fire will be
animated in the Scene. Because Unity will activate any particle
system when selected, you can see how it changes as its properties
are modified. We will examine particle systems in depth in the next
chapter.
Step 44. With Fire1 selected in the Hierarchy, select Component >
Physics > Box Collider from the main menu to add a collider to the
fire. Modify the collider's values as shown in Figure 6.15 to enclose the
fire with the box. This box will be used to determine if the player has
walked into the fire.
Step 45. Check the fire's box collider IsTrigger box. This will allow the
player to walk into the fire and also trigger a collision message.
Search Nedrilad ::




Custom Search