Boss Battle
After finishing the second level, I decided to introduce a new level. This is supposed to be the 3rd and last level. This level only has 1 plane with 1 enemy on it. The fight is a boss battle and by defeating the boss, the player completes the game. The boss is made up of a few things.
- New model
- More animations
- Teleporting between spots
- Multiple attacks
New model
The first thing I needed to do was look for a new model which needed to support the new attacks I was planning. I decided to take the model seen in the screenshot below. Again, from Mixamo.

More Animations
The animations I used are also from Mixamo. By looking at my planned attacks I decided to use animations for: Crouching, Dying, Shooting Fireball, Jumping, Standing Idle and Taunting.

Here you see the animator controller which controls the order the animations are played in. It starts by standing Idle. Every so often it will taunt the player to get within its sight. When the player does, it starts of by playing the "Throw" animation, after that the "Laser Attack" animation and finally the "Jump Attack" animation. These all have their own code attached to it which regulate the attacks. When the enemy's health is 0, it plays the "Dead" animation.
Teleporting Between Spots
To make the boss harder to predict, it will
teleport to a random location every few seconds. By doing this the player might
lose sight of the enemy which might form a surprise attack. I did this by
setting 4 teleport points on each side of the plane.


Every 5 seconds, the enemy randomly gets teleported to one of the 4 spots. It only does this when the enemy is not in the middle of its Laser - or Jump attack.
Multiple Attacks
The normal enemies only have their fireball throwing attacks. For the boss battle, I wanted a little more variety. Because of this I decided to add 2 more attacks. The "Laser Attack" and the "Jump Attack". This together with the standard "Fireball Attack" creates an enemy that rotates between 3 attacks.
Laser Attack
This attack makes the enemy shoot lasers from his eyes. These lasers are drawn from the eye, towards a point on the plane. The points on the plane then start moving in a random direction which makes it impossible to predict where you will be save and it requires fast thinking by the player to dodge the lasers. The longer the player is exposed to the laser, the more damage it does.

