Time for action - let's get lazy
There's no need to create an entirely separate script for the stein. Follow these steps to get more bang for your buck out of a single script:
- Find the script you called Bomb Script in the Project panel, and rename it FallingObjectScript. Because we'll be using the script more generically, we should give it a more generic name.
- In the Project panel, select the Stein Prefab.
- Choose Component | Scripts | FallingObjectScript in the menu to attach the script to the Prefab.
- In the Inspector panel, you should see that the FallingObjectScript has been added as a Script component to the Stein Prefab.
- As we did earlier with the Bomb Prefab, find the Glass Smash Prefab in the Project panel. Click-and-drag it into the