0

I am trying to create a game over window for my game in swift, and I don't know where to start. Is there any way to create a pop-up window in the game scene. I am using sprite kit and have created the user interface in the Gamescene.sks file.

Thanks for the help.

joshLor
  • 1,034
  • 1
  • 12
  • 27

1 Answers1

1

If my memory serves me correctly, you totally can. You'll want to create a base node and label it with meaningful name, like GameOverNode, in the game scene.

Then you add the user interface nodes that you want as a child of it. To create the popup effect you'll want to make the GameOverNode hidden. When you want to show the game over popup, set it to not hidden.

Tip: When you add the user interface nodes you may want to set them up so they're off screen. That way when you show the GameOverNode you can animate all the sub nodes into screen.

hola
  • 3,150
  • 13
  • 21
  • Use SKNode’s `zPosition` to make sure the elements in the game over window are in front of the game scene. – Gary Makin Mar 12 '17 at 08:09