Topics: Unity Game Engine, Materials and Prefabs, Physics and Collisions, Audio Sources, and Unity Scripting with JavaScript
Related Reading: Class notes and supplementary material
Read and follow the directions for creating the brick wall, and implementing the projectile shooter as described in the Chapter 2 supplementary material given out in class.
Note: We are walking through this process in class, so class attendance and participation will be particularly beneficial.
Add a sound effect to shooting the projectile.
As discussed in class (and at the end of the class handout), you will need to make four modifications to accomplish this:
var throwSound : AudioClip;
instance.audio.PlayOneShot (throwSound);As shown in the handout, this line of code should go in the Update() function, at the bottom of the if statement's code body.
Add some "life" to your Scene.
While the final product in the chapter is cool in the sense that you can now shoot projectiles at a wall to knock it down, the Scene is otherwise rather prosaic and boring. Give the Scene your own personal touch to make it more interesting.
Some possible ideas: