2D Shooter: Negative Powerups

Sabrina Windsor
Aug 29, 2021

--

Objective: Create a powerup that decreases the player’s speed.

First let’s create visual. I basically just grabbed the speed powerup, renamed it, changed its color, changed the powerup ID, and turned it into a new prefab.

Now in the player script, lets make the method and a coroutine pretty much exactly like the speed boost powerup, except we’ll be subtracting.

Now let’s make the changes to our spawn manager, by assigning this to the 7th slot (element 6) of our array.

Don’t forget to change the range values in the code.

And finally to call the method in the powerup script.

Now we’re done!

--

--

Sabrina Windsor
Sabrina Windsor

Written by Sabrina Windsor

Currently learning to code with the help of GamedevHQ in order to someday my my game ideas come to life!

No responses yet