Every powerup should have a limit and we can easily create this limit in code.

Open the Player script and add an IEnumerator. Within this coroutine function, we will switch the bool to false after 5 seconds when active.

Then add a StartCoroutine callup in TripleShotActive().

--

--

When we are making a game, one of the key elements is animation. I will show you now how to animate sprites for a 2D game.

This is what our animation will look like:

First, let’s get the first sprite and drag it to our Hierarchy panel. Change the name to “Explosion”.

--

--

I am making a game, and it is finally starting to feel like one! I have implemented player movement, enemies, a weapon, and have added art to it.

The state has been achieved after following the replacement procedure of 3d objects to 2D sprites. Along with the graphical changes, a few changes were made in the scripts also that had interaction methods for 3D objects and now it needed a 2D treatment.

So far, the process taught me some of the critical concepts such as vector positions, coroutines, Object tagging, script communication, reference caching, and basic code refactoring.

--

--