2D Shooter: Preparing the Shield Powerup

Sabrina Windsor
Jul 15, 2021

--

Creating the prefab for our shield powerup is pretty going to be just like adding the first two. Drag the sprite you want into the hierarchy to create a Gameobject, rename it “Shield_Powerup”, and start adding components.

First, add the Circle Collider and make sure “is trigger” is checked.

Next, add RigidBody2D and make sure gravity is set to zero.

Finally, attach the powerup script we already made here, so we can get our newest powerup to start moving downward. You can also change the ID number to 2, it’ll be important when we add it to the spawn manager later.

And we’re all done for now! We’ll be adding animations to both the Shield and Speed powerups next time!

--

--

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