Day 56: Winning the Game

Boqin Zhang
Mar 15, 2023

--

We almost ready to host our game. But before that, let’s create a game-won effect.

When the boss is destroyed, we’ll have the UI Manager perform the game-won effect.

Boss Script

We can take advantage of the game-over UI text. We’re simply going to use the same text to display “WINNER!!!” instead of “GAME OVER.”

UIManager Script

Tip: To get the same centering for both the game-won and game-over sequence, make sure both text have the same number of characters. I added extra exclamation marks to game-won text so both texts have 9 characters.

--

--