Game Development Reference
In-Depth Information
To make our example more fun, I would like to add an interesting feature to our building blocks.
What if we become able to reconstruct the whole building after destroying it? This idea can be
simplyimplemented by storing the original position of each block at the beginning, and then
returning it smoothly to its position when, say, space bar is pressed. The script Returner does
this interesting job when attached to the prefab of the building block. This script is shown in
Listing 58.
Search WWH ::




Custom Search