I am trying to work on a new game project where I will include multiple levels. I was reading this question (Sprite Kit - Defining the variables for multiple scenes) about t
You can override functions of baseScene
in level1Scene
, you just need to make sure you call the super
version of the method. Here are a few examples, in your level1Scene
class:
override func didMoveToView(view: SKView) {
super.didMoveToView(view) // Calls `didMoveToView` of `baseScene`.
// Additional setup needed for `level1Scene`...
}
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
super.touchesBegan(touches, withEvent: event) // Calls `touchesBegan` of `baseScene`.
// Additional stuff you want to do in `level1Scene`...
}