Nicholas Lim

There are some new enemy types to introduce, and one of them is a more aggressive enemy that rams the player when they’re in range.

After some edits to the Enemy script to organize the new enemies with a switch instead, I add the following code for this particular enemy.

Aside from the Triple Shot powerup, the Player will be given another alternate fire mode powerup, a 360 multi shot.

First I set up the Powerup object the same way as before.

Next I create a new laser type prefab by arranging eight lasers around the player. This will be what the Player instantiates.

Then I add this Powerup to the Spawn Manager, while adding new code in the Powerup script to activate this 360 Laser on the Player when collected.

Lastly update the Player script to toggle this fire mode on when collected and start the coroutine timer to turn it off after five seconds.

The Player will now be given a limited ammo count of 15 to prevent laser spam.

Create another Text UI element under the Canvas and call it something like “Ammo_count_text”. Update the following in the UI Manager script.