After going through different parts of the Unity engine, it's time to come back to our game and finish it up. In doing this, we will explore another big topic: gameplay programming. In particular, we will see how data can be exchanged between different parts of a game. Since in our tower defense game there are still many parts to connect, and they can be implemented in thousands of different ways, I tried to choose different techniques in order to give you a different perspective on how things can be implemented within Unity.
Specifically, in this chapter we will cover:
How to implement a trading system to allow the player to buy, sell, and upgrade cupcake towers
Scripting how the player can place cupcake towers on the map once they are bought
How game over conditions can be triggered to display a winning or losing screen
Keeping track of the progress made by the player during the level
Creating a spawn system...