Game Development Reference
In-Depth Information
It is time to move back to our building blocks which we have used to build the walls in
our scene. In addition to being destructible, we need these blocks to be affected by ray
cast bullets. First of all, we need to create bullet holes on these walls. Therefore, we have
to attach
BulletHoleMaker
script (Listing 52 page 133) to our
ShootableBrick
prefab, and
provide the script with the prefab of the bullet hole we have created earlier. Additionally,
we have to remove
MouseExploder
script from the building block, because we don't want
to have an explosion with each mouse click on the block.