Phase 2: Boss AI Part 1

Simon Leen
Jul 6, 2021

Objective: Create a Boss that arrives at the end of the final wave

We start with the usual create the sprite, bring it in and make it into a prefab. Next inside the spawn manager create a serialized private gameobject called boss and assign it in the inspector. We create a new coroutine called BossTime which will instantiate the boss just above the screen.

In the EnemyDestroyed method where we trigger each wave we check on the last enemy destroyed if the wave level is at a specific number and choose the set of coroutines to start (another wave or boss time).

In the next post well set up the Boss Attacks and other behaviours but the image above might give a small clue as to one of them.

--

--