Ammo Collected!- Game Dev Series 36

Objective: Create a collectable ammo powerup to refill.

  1. Add extra lines to code to make this powerup works.

Create a functional prefab

Drag the first sprite that you prepared for this powerup into hierarchy as a gameobject. Rename it and add every component you need.

And also set the animation!

Add lines of code to scripts

First, in the Player script, create a public method to update the ammo and also update the UI.

Don’t forget to send the ammo counts to UIManager.

A passionate gamer whose goal is to work in video game development.