Adding scripts to the brick sprite
Brick sprites are the building blocks that form the game platform. In this section, we will show how to clone the brick sprite to form the game platform. Moreover, we will make the platform auto-scroll to make the game faster-paced and more interesting. In Hunger Run, to keep it simple, we will start the game with one brick for each grid. Further, we will create all the bricks at game start to reduce game lag. For real world games with much larger grids and more sprites, the sprites may be created when needed for scalability.
We will create scripts for the following:
- To respond to game start
- To initialize ...