Journal 140 — Unity Project Development Part 2–2.5D Shooter
Objective: Add next round of updates to 2.5D Shooter game
In the previous article, I started setting up a basic 2.5D shooter with movement and weapon fire. I’ll now add the enemies using a wave system.
I’ll start with a series of waypoints: empty game objects. I will also use a waypoints container and a script to draw the waypoints lines in Scene view. I will start with one set, and I will probably make some more sets of waypoints for the different waves of enemies and the boss fight.
Next, I will use a scriptable object for the enemy wave system. Then I can create a wave asset file in the Assets folder and drag in one of the enemy prefabs.
Enemy Base Class and Custom Enemy
I figure I will have a variety of enemy behaviors like right to left movement or waypoints, damage functions, shooting functions, and power up drops. So, I will start with a base enemy class and then have some custom enemies that can override these behaviors. For now, I will just implement the waypoint movement.
I will need a Game Manager as a singleton pattern to keep track of all the enemies, quit application, and also keep track of all the enemy waypoints and assign the waypoints after the prefab enemies are instantiated.
I will need a Spawn Manager to handle the spawning of the waves.
Note when the enemies are instantiated, I need to use Quaternion.Euler to set the correct rotation of the prefabs.
Now, let’s see this in action.
Thank you for your time!
In the next article, I plan to get the weapons working for the enemies.