Types, Methods, and Classes Intermediate topics around types, methods, and class extensions to enhance the functionality of the code created.
Refactoring DRY I've heard DRY a lot when I started learning to code in my early years. I took a some C, C++, Java, and Python courses. All of which are object oriented programming languages. One common theme that we were constantly reminded of is D ont Repeat Yourself (D.
Did we win??? Or lose?? We have the basics setup for the game. We have a win condition, we can defend ourselves using the firing mechanism we built in earlier. We know that if the enemy player hits us enough we'll lose all our HP. But how do we update the
Seek And Destroy Ok, so our enemy NPC has a patrol route around the arena. Next step is to make the enemy target the player when he gets to close and cause damage when the enemy collides with the player. I think I'm starting to get the hang of some of
Navigation I have a player that I can move around and shoot using the keyboard, how does the enemy player I created do those same things. In Unity, its through the use of NavMes and NavMeshAgent. The NavMesh is a map of the walkable player surface on the level. The NavMeshAgent
Scripting Game Mechanics We're jumping now... Enumerations are super powerful tools in C#. In the Hero Born PlayerBehavior code, we use an enumeration to get keyboard input using the KeyCode enum. Without the use of a layer mask, the player can hit the key repeatedly. If we set the program to
Movement, Camera Controls, and Collisions So chapter 7 is pretty huge in terms of building up on chapter 6. I guess that's why he structured the book that way. In this chapter, I learned how to control the player object using the 'w a s d' keys as well as the