Journal 22 — Retro Game Over in Unity

Following up my previous journal, after losing all lives, we want to show a game over message.

In the UIManager script, where we are updating the images of the spaceships as lives are lost, we can access a new method in the same script to start a game over sequence.

UIManager script to update lives onscreen and start the game over sequence

In the GameOverSequence method, we will do three things: set active the game over and restart text, start a coroutine to show the game over text as retro style flashing, and call a method to allow for the game to be restarted (more on this in a later journal).

UIManager script and game over sequence

In the GameOverFlicker coroutine, we create a series of actions to show the game over text, pause, hide the text, pause, and repeat.

UIManager coroutine to generate flicker of game over text

See the results of the coroutine in play.

Unity Playmode, game over!

Thank you for stopping by!

--

--

--

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Get Started with Rev AI API Webhooks

Apecoin DAO: Staking + Marketplace Updates

Hybris Flexible Search

Now that it’s all said and done…

Switch Career to Software Engineer: Fears, Concerns, and Opportunities

Download Excel File From Online In SSIS

How To Fix BLU Grand 5.5 HD Not Charging [Troubleshooting Guide]

This Week In TurtleCoin (July 30, 2109)

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
Chris Nielsen

Chris Nielsen

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

More from Medium

Journal 151 — Unity Project Development, 2.5D Shooter

Making a RTS game #48: Various fixes, improvements and clean-ups (Unity/C#)

A Series On Creating Immersive Audio in Unity with Custom Wwise Scripts

Framing Transposer Virtual Camera Explained in Unity’s Cinemachine