Objective: Create a countdown timer to utilize whenever you need it

While working on adding another weapon to the space shooter I ran into an issue where I am trying two separate effects, but could not implement them correctly without a timer.

From the Unity forums

Credit to U_Ku_Shu user

Using waitforseconds allows that 1-second pause before counting down. It’s a simple yet, really great way to implement. I slightly modified the code to read like this:

When the loop ends in IEnumerator, the particle effect I implemented disappears and my child item is disabled. Further, it won’t keep counting past 0.

Objective: Understand how to implement an ammo system

What to implement:

  1. Ammo powerup prefab
  2. Display Ammo on-screen
  3. AudioManager to handle multiple in-game sounds̶
  4. Rigidbody and collider for interaction
  5. Scripting to store, display, and update ammo amount
  6. Double checking Unity

I modified the existing prefabs created for speed and powerup. …

Objective: Understand how to give the effect of the enemy firing back and taking damage

Understanding what you need to implement it:

  1. Laser prefab for the enemy
  2. The enemy needs its own weapon system
  3. Garbage collection for the enemy laser
  4. Interaction between the player and the enemy laser

From the…

Objective: Utilize the explosion gameobject when the enemy is destroyed

Drag the explosion gameobject into the prefab folder. Delete it from the Hierarchy view.

Create a gameobject for the explosion and serializefield the gameobject.

[SerializeField]private GameObject _explosion;

Save it, attach the explosion prefab to the enemy prefab. Instantiate the explosion in the Enemy script in the OnTriggerEnter2D method under the “playerweapon” if statement.

Instantiate(_explosion, transform.position, Quaternion.identity);

For basic functionality of an explosion, this is really it.

Objective — Understand how to create, manipulate sprite size, and animate an explosion in Unity.

When creating an explosion, it gives a game that cool or wow effect. The explosions used in this are provided by Will’s Pixel Explosions! on itch.io


  1. Create a gameobject
  2. Create an animation for gameobject

Objective: Understand how to create a game object that gives the player an advantage in-game.

The idea of the powerup is seen in the majority of games. Whether its a boost with a mushroom in mario kart or extra stats for a weapon in an RPG. …

Objective: Understand how to turn sprites(pictures) into game objects.

So you have the scene setup, enemies spawning, great. Let’s go from simple boxes to something more colorful.

Objective: Create the ability to destroy enemies and lose lives


Objective: Ability for the laser to destroy the enemy, the player, and lose lives. As an extra ability, the laser object will be destroyed when colliding with an enemy.


  • attach box collider2d and rigidbody2d to enemy, player, and playerweapon…

Objective: Create an enemy to spawn on-screen

kittyloaf vs evil toaster

Here we have a player object using a playerweapon object to fire the weapon. The enemy object randomly generates within the borders of our game screen.

I started by dragging a sprite into the Hierarchy section

Objective: Understand how to implement null checking and a simple game over screen

Game over man, game over!

While playing with UI features in Unity, I wanted to try creating a basic game over Text object to display on the screen. Then remove the score Text from the screen.

Started with a new Text object…

Benjamin Calvin

Dedicated and motivated individual learning programming and sharing my discoveries with you.

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