Damage VFX on the Player

A Gameobject player, 2 gameobjects with animated sprites showing the spaceship damage, and laser-player script communication.

The first step is pretty simple, create 2 empty gameobjects inside the player and attach them an Animator component with their respective animations

Let’s look at adding some visual effects (VFX) to our game, starting with an explosion that triggers when our enemies are destroyed.

To do so, we are going to want to trigger an animation on the enemy's death.

Like our previous animations, we can simply create a new animation for…

I’ve added another text object that appears within my GameOver function of the UI Manager script. Let’s create some functionality to reset the game.

Firstly, we can create an empty GameObject called GameManager, and have our UI Manager call a method.

In our public method, we can set a bool…

Let’s create more UI to better show that it’s Game Over.

Let’s add a Text component to our Canvas, and position it as desired.

We only want this to appear when it’s actually Game Over time, so let’s disable it. Now within our UI Manager script, it’s also good practice…

The tools in Unity are simple and easy to use and that is one of the most astounding things in Unity!

Today we are going to focus on the built-in features for building your User interface.

What is a User Interface (UI)?

A User Interface is a game or program’s visual display of information to the…

What happens if we have tons of powerup? It would be a complete nightmare in an if statement. Since we have a powerup ID for our powerups, there is a more efficient way to identify objects directly.

We can use a switch statement instead of an if statement.

In the…

Modular development is a huge part of software design. Updates, Downloadable Content, Expansions, Sequels, or just continued development of a project will all see the benefit and use of modular systems.

These systems are “Modular” because they are made with the intent to be added onto or changed throughout development…

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.

Ernesto Rocha

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