Summary
Well done for reaching the end of this chapter! We have finished developing all the major features of an RTS game and our Dragoncraft game is ready to play, as well as having more levels.
In this chapter, we added the last feature of the book, which was the game progression using objectives. We learned how to set up objectives for time, resource collection, and enemies defeated, and added them into a ScriptableObject that can be used to create different objectives for each game level.
We also implemented a component for tracking the player’s progression in each objective, as well as displaying the status of each objective in the UI to make it easier for the player to track the objectives. We also learned how to pause the game using the timescale, and added this to our fully functional pause popup.
Finally, we learned how to evaluate whether the player won or lost the game and how to trigger a Game Over popup with visual feedback for the player, with a Restart...