Chapter 15: Implementing Movement and Spawning
In the previous chapter, we learned the basics of scripting, so now let's create our first behaviors for our game. We will see the basics of how to move objects through scripting using the Transform component, which will be applied for the movement of our Player with the keys, the constant movement of bullets, and other objects' movement. Also, we will see how to create and destroy objects during the game, such as bullets our Player and Enemy shoot and the Enemy Wave Spawners. These actions can be used in several other scenarios, so we will explore a few to reinforce the idea.
In this chapter, we will examine the following scripting concepts:
- Implementing movement
- Implementing spawning
We will start by scripting components to move our character through the keyboard, and then we will make our player shoot bullets. Something to consider is that we are going to first see the C# version and then show the Visual...