Y
Y
Yura Istomin2015-02-25 20:16:32
Objective-C
Yura Istomin, 2015-02-25 20:16:32

How to create levels in the game on Sprite Kit?

I'm working on a Sprite Kit platformer. After the death of the hero, the view shows the GameOver scene, which has a restart button. How to make it so that when you click on this button, the view shows the scene of the level at which the loss occurred?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nbelopotapov, 2015-02-26
@VahaJaha

in the touchesBegan method
if self.nodeAtPoint(location) == self. retryButton {
var myScene = yourSceneName(initialize the scene)
view.presentScene(myScene)
}
as one of the options

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question