Powerup Series: Creating & Animating a Powerup object

Part 2: Create the Triple Shot Powerup object with animation

Erin Kerr
2 min readOct 22, 2022

With the Triple Shot behavior created, we’ll need to add a Powerup object next. This is the object we will eventually collect to trigger the Triple Shot behavior.

Creating the Powerup object

Creating Triple Shot Powerup object

To create a new 2D object, we’ll drag and drop one of the Sprites for the Triple Shot Powerup into the scene and rename, resize and assign the Foreground Sorting Layer.

Simple Powerup screen for to add movement

Next, we’ll add a simple Powerup script so that the object travels down screen at a constant speed and is destroyed once below the bottom edge of the screen.

Animating the Powerup object

When working with Sprites in 2D games, animation is like creating a flip-book of images that give the impression movement or transition. To create an animation in Unity, open the Window menu in Unity and select the Animation submenu, then the Animation window.

Next, select the object to animation click Create in the Animation. If not already present in your project, create an Animation folder and save the new animation with “_anim” at the end of the file name to keep things organized.

Then, select all the sprites that will make the animation and drag them into the Animation window. You can sample the default construction by click the Play button in the animation window.

Powerup object in motion

For this TripleShot powerup, the default animation works well. With the powerup object constructed, we are ready to build the functionality to collect the powerup in the next article.

--

--