Creating The Boss Fight! (Part 3: The Sentry’s Setup)
Today I’ll be making the two Sentries spawn in the same way I made the Shield Generators spawn in yesterday’s post. The Sentries will not spin around the Boss like the Generators do, but will attack the player with pretty strong attacks instead.
Today’s Objective: Write a new script to spawn the two Sentries in the same way as the Generators, but without spinning.
The new “BossSentryManager” script is almost identical to yesterday’s “BossGeneratorManager” script, so I won’t show repeated code.
Basically, same as the Generator spawning, I use variables to control the amount and 360-degree angular spawning of a number of “Sentry” prefabs. Unlike the Generators, these do not rotate around the Boss, so the Update() only checks if the Sentries have been destroyed or not.
I’ll add health to each of the Generators, Sentries, and the Main Body, so that they can be destroyed by the player.
In the days after that, I’ll be adding functional guns to all parts, animating the Boss to move around the screen, and creating some powerful attacks that the Boss will make.
Check back soon to read those posts!