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.
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).
In the GameOverFlicker coroutine, we create a series of actions to show the game over text, pause, hide the text, pause, and repeat.
See the results of the coroutine in play.
Thank you for stopping by!