2D Shooter: Flickering Game Over Screen

Sabrina Windsor
2 min readJul 23, 2021

Objective: Create a game over screen that flickers when the player has run out of lives.

In the canvas object, make another Text child object and name it GameOver_Text, and change the actual text to how you want it. By default, this text shouldn’t be active, so you can make the box next to the name unmarked. Now go to the UIManager script and attach the object to a Text variable.

In the start method, you can make sure that it’s off by default by making sure it’s set to false.

Now let’s make a game over sequence that will be it’s own method.

As well as a coroutine that will be responsible for activating and deactivating the image at regular intervals, which will create a flickering effect.

Last but not least, go back up to the UpdateLives method, and write this:

This is what will check to make sure that the GameOverSequence gets called once we run out of lives.

--

--

Sabrina Windsor

Currently learning to code with the help of GamedevHQ in order to someday my my game ideas come to life!