Join Kelley Hecker for an in-depth discussion in this video Show the game over screen, part of Building a Match 3 Game with Unity.
- [Voiceover] Now that we've created our functions…to show the Game Over screen when we win or lose the game,…we need to call these functions from the HUD.…Open up the HUD script.…The HUD already knows when we win or lose the game…because the level is calling the OnGameWin…and OnGameLose functions.…This is where we'll show the Game Over screen.…Add a variable to store a reference to the Game Over screen.…In the inspector, assign the reference…to the Game Over screen.…
Click Apply to apply to the pre-fab.…In OnGameWin, we'll call gameOver.ShowWin…and we'll pass in the score and starIdx,…which is the number of stars the player got.…In OnGameLose, we'll call gameOver.showLose.…Unity will give you a warning when you've created a variable…that's not being used.…Since isGameOver ended up never being used,…let's go ahead and remove it.…
Hit play and finish a game.…The Game Over screen popped up, and it shows…how many stars we got and our score.…Right now, the Game Over screen appears…as soon as we run out of moves.…But at this time, the board might still be refilling…
Game developer Kelley Hecker covers topics like creating a grid-based game board, using inheritance to create different types of game pieces, adding obstacles and new levels, detecting matches and clearing pieces, and implementing a user interface complete with a score screen. By the end of the course, members will have a completed game and learned new techniques to apply to their next Unity project.
- Creating a game board grid
- Creating and scripting game pieces
- Filling the board
- Creating obstacles
- Swapping pieces
- Matching pieces
- Clearing obstacles and pieces
- Creating new levels
- Creating the user interface: HUD, game over screen, etc.
Skill Level Intermediate
Creating Mobile Games with Unitywith Kelley Hecker1h 12m Intermediate
Build a Real-Time Strategy Game with Unity 5with Dan Violet Sagmiller3h 47m Intermediate
1. The Game Board
2. Make a Move
3. Special Piece Types
4. Level Types
5. User Interface
Next steps1m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.