Phase II: Boss Enemy, Part 1

Objective: Add a Boss Enemy Battle after the final wave.
As a placeholder for the Boss Enemy, I’m using a 2D primitive hexagon stretched out to look more like a mothership size.

I also added a Polygon Collider 2D set to IsTrigger to detect collisions along its correct shape.

I then added a RigidBody2D and set the gravity scale to 0.

The next step is to add a script to the Boss Enemy. I named it BossBehaviour. Now that the script is added, I can start working on how the Boss will work.
Once the Boss Enemy is instantiated, the first order of business is to have them move into attack position. To this end, I’ve created the following variables.

The Boss Enemy will move straight down the center of the screen, and the _destinationY will be where it will stop to get ready to begin an attack routine. I’ve played around, and it seems that 1.5 is a good speed for the movement into position. I achieved this by creating a method MoveToStart(), which I call from the Start() method.

Now that the Boss Enemy is in the position, I can start working on an attack routine and handling damage from the player. Those will be covered in the next article.
Although this article was a bit short, I do hope you found it interesting. There will be more meat in the next article.
Until then, I wish you well on your own coding journey.