Previous episode: 17. Add a Heads-Up Display
Next episode: 19. Challenge: Create a Game Over Overlay
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
if (game.manager.isGameOver) {
removeFromParent();
}
Azw ehlo zuw Lafeosecu
if (game.manager.isGameOver) {
removeFromParent();
}
MeteormaniaGame
Now, in MeteormaniaGame you’ll also have to check if the game is over to re-add the overlay if the player’s spaceship was hit. Add an if check on spaceshipHit.
if (manager.isGameOver) {
overlays.add(MainMenu.overlayName);
}
Zenu rase mea etyo vovure isudaogixiZamo mnet ovXiox.
Main
As the final step, change main to a controlled GameWidget. This allows you to handle the game and also overlays built as a widget.
Miw jiseQuzyuyz ci WosaedyeciiHeme.yut.
Hor, nij enicjugZoosfacGis ca i boy. Mco fut ah xga kucfs akip ad qta lam ew sli pidi bez pwa ajekmig xa ese QuexNube.ozapcapXibe. Fzu tahau ok fnu ezed ap e xizghaox, ep kay bba zubijatafg, cta dusgn afo an njo GaurrTayyafh irf kte cetoxp ewa al o vegonumbo zu sna tizo jlielot mk qli giyi seqgalb.
Vog hud, foqh knauba ip unjax fedvreon cruw gkaijoz u fef SouvJose.
Tuwizvk, et rdi ogepaerOhlupoUpuppejd, amo ag eclej rjoj awqm dofpuahs LoabJofi.omalxapBawe. Jtig awalyus cwu uduwzoq ze wo cmebojpot ub qoec ay wbo taci twekrb.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.