Summary
Congratulations! Hero Born is now a playable prototype. We implemented jumping and shooting mechanics, managed physics collisions and spawning objects, and added in a few basic UI elements to display feedback. We even got as far as resetting the level when the player wins.
A lot of new topics were introduced in this chapter, and it’s important to go back and make sure you understand what went into the code we wrote. Pay special attention to our discussions on enumerations, get
and set
properties, and namespaces. From here on in, the code is only going to get more complex as we dive further into the possibilities of the C# language.
In the next chapter, we’ll start working on getting our enemy GameObjects to take notice of our player when we get too close, resulting in a follow-and-shoot protocol that will up the stakes for our player.