Reputation: 441
I am a newbie to spritekit game development.
Now I have created a basic game scene like a plane shooting enemies.
But how to implement more interactive stuff like play/pause, game start and game over?
My question is, are those scenes embedded into the game scene as nodes, or they are different SKscenes?
Thank you all!
Upvotes: 1
Views: 130
Reputation: 2437
You can create new scenes and transition to them (swift example) - Create a new swift file for your new scene
class SceneTwo: SKScene {
override func didMoveToView(view: SKView) {
}
}
In your main or first scene you can transition to your new scene in the following way....
let sceneTwo = SceneTwo()
let transition = SKTransition.doorwayWithDuration(1.0)
self.view?.presentScene(sceneTwo!, transition: transition)
You can pause any scene....
self.scene.view.paused = YES
Upvotes: 2