In this chapter, we will create a new scene and build a functional scrollable viewport in which we can drop objects that will stick to it. We will add interesting features such as scroll bars and keyboard scrolling with arrows.
This scrollable viewport will be the base of our game from the previous chapter. So, from here, the user will become the player. The idea is that the player can scroll and drag barriers on a viewport, which will take a few seconds to build. Enemies will come down from the top of the screen. If an enemy touches a barrier, he or she will be destroyed along with the barrier—but we will deal with enemies in Chapter 7, Creating a Game with NGUI.
The more barriers there are on the scene, the longer the building process will be for the future barriers— this is the same idea with the barriers' cooldown.