The player will have the occasional ability to quickly collect all powerups and collectibles on screen by pressing C.


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.


For this challenge, I’m to create a pickup that’s actually a debuff of some kind. I’ve decided that this debuff will jam the trigger, making the player unable to fire for the duration of it.

The steps to create the prefab, its spawning code, and duration code is the same…


The enemies will spawn in waves, and the game will announce the start of each wave.

To begin, we add a new Text element to the UI Manager that will display the wave via a coroutine, for three seconds.


We now level up to the Phase 2 challenges! Slightly more complex stuff.

First up, the enemies will now slowly move downwards while strafing side to side instead of moving down in a straight line.


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’s shield should last for three hits and have an indicator that the shield is weakening. I’m going to make it more transparent the more hits it takes by lowering the alpha each hit.


The Player needs an indicator too obvious to miss that they’ve taken damage. It might be too late if all I rely on is the visual fires on the sprite or the lives counter. Nothing is more obvious than having the entire screen shake violently.

To do so we will…


These tasks are to create ammo and health collectibles.

After importing these sprites, I create a new Collectible script which is basically a copy of the Powerup script, but I just wanted a clean slate.


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.

Nicholas Lim

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store