Game Development Reference
In-Depth Information
• One for the when the aliens are destroyed, one for when the player's ship is
destroyed
Let's begin with the player's ship firing.
1. The first thing to do is to import our audio files into the project. Create a new
Audio folder in the Project panel and import your audio files of choice as
New Assets . For this prototype, we used audio clips taken from the site ht-
tp://www.classicgaming.cc/classics/spaceinvaders/sounds.php .
2. Next we need to add an AudioSource component to the PLShip prefab.
Select it from the Project panel and from the main menu, select Component
| Audio | Audio Source . The Audio Source component will be added to the
PLShip prefab.
3. Now drag the desired audio file into the Audio Clip slot of the Audio Source
component you added, in the Inspector panel. Refer to the following screen-
shot for clues:
Search WWH ::




Custom Search