Homework
In this chapter, we have covered many techniques on how to exchange information between different parts of our game, and learnt a bit about gameplay programming. Here there are some exercises to improve your skills and become a better game developer:
Sweet capital: When the the game begins, Pandas start coming and the player should buy some cupcake tower to defend his/her cake. But, at the very beginning, the player doesn't have any sugar to buy towers, nor he/she can kill some Pandas to get some sugar. Thus, add an initial sugar amount variable in the
Game Manager
(so that it can be set from the Inspector), and set this quantity in theSugar Meter
within theStart()
function. As a result, the player will be immediately ready to fight Pandas.The calm before the storm: At this stage, when the game starts, the Pandas immediately come to eat the player's delicious cake. However, the player should have the time to buy and place some cupcake towers at the beginning, with the capital set...